/*
Theme Name: Tecnibandas Blog
Theme URI: https://blog.tecnibandas.co.cr/blog/
Description: Tema hijo de Astra diseñado para integrar el blog con el sitio corporativo de Tecnibandas.
Author: Tecnibandas
Template: astra
Version: 1.1.2
Update URI: https://tecnibandas.co.cr/temas/tecnibandas-blog
Text Domain: tecnibandas-blog
*/

:root {
  --tb-navy: #173166;
  --tb-navy-dark: #0f2550;
  --tb-yellow: #fed71e;
  --tb-ink: #171a2b;
  --tb-muted: #657083;
  --tb-line: #e5e8ef;
  --tb-bg: #f6f7fb;
  --tb-white: #fff;
  --tb-radius: 22px;
  --tb-shadow: 0 18px 50px rgba(20, 26, 60, .10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--tb-ink);
  background: var(--tb-bg);
  font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--tb-navy); text-decoration: none; }
a:hover { color: var(--tb-yellow); }
img { max-width: 100%; height: auto; }

.tb-container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 16px;
  margin: 10px;
  color: var(--tb-navy);
  background: #fff;
}

.tb-site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  color: var(--tb-navy);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
}

.admin-bar .tb-site-header { top: 32px; }

.tb-header-inner {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 34px;
}

.tb-logo-link { display: inline-flex; align-items: center; margin-right: auto; }
.tb-logo { width: auto; height: 125px; object-fit: contain; }

.tb-nav { display: flex; align-items: center; gap: 30px; }
.tb-nav a {
  position: relative;
  color: var(--tb-navy);
  font-size: .94rem;
  font-weight: 600;
}
.tb-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -9px;
  height: 2px;
  background: var(--tb-yellow);
  transition: right .2s ease;
}
.tb-nav a:hover, .tb-nav a[aria-current="page"] { color: var(--tb-navy); }
.tb-nav a:hover::after, .tb-nav a[aria-current="page"]::after { right: 0; }
.tb-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--tb-navy);
  background: transparent;
  border: 1px solid rgba(23,49,102,.22);
  border-radius: 12px;
  font: inherit;
  font-size: 1.35rem;
}

.tb-blog-hero {
  position: relative;
  overflow: hidden;
  padding: 38px 0 42px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 12%, rgba(254,215,30,.24), transparent 27%),
    linear-gradient(135deg, var(--tb-navy-dark), var(--tb-navy));
}

.tb-blog-hero::after {
  content: "";
  position: absolute;
  right: -100px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025);
}

.tb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--tb-yellow);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.tb-eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

.tb-blog-hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.045em;
}

.tb-blog-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.78); font-size: 1.1rem; }

.tb-main { position: relative; z-index: 2; margin-top: 0; padding: 56px 0 84px; }
.tb-section-head { margin-bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.tb-section-head h2, .tb-archive-title { margin: 0; color: var(--tb-ink); font-size: clamp(1.8rem, 3vw, 2.5rem); }
.tb-section-head p { margin: 5px 0 0; color: var(--tb-muted); }

.tb-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.tb-featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  overflow: hidden;
  margin-bottom: 64px;
  background: #fff;
  border: 1px solid rgba(17,18,122,.08);
  border-radius: 26px;
  box-shadow: var(--tb-shadow);
}
.tb-featured-post__media { min-height: 430px; background: var(--tb-navy); }
.tb-featured-post__media img { width: 100%; height: 100%; object-fit: cover; }
.tb-featured-post__content { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 58px); }
.tb-featured-label { margin-bottom: 18px; color: var(--tb-navy); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tb-featured-post h2 { margin: 0 0 16px; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
.tb-featured-post h2 a { color: var(--tb-ink); }
.tb-primary-link { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; margin-top: 8px; padding: 12px 18px; color: var(--tb-navy-dark); background: var(--tb-yellow); border-radius: 12px; font-weight: 800; }
.tb-topic-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.tb-topic-links a { padding: 8px 13px; color: var(--tb-navy); background: #fff; border: 1px solid var(--tb-line); border-radius: 999px; font-size: .82rem; font-weight: 700; }
.tb-topic-links a:hover { background: #fffbea; border-color: var(--tb-yellow); }
.tb-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(17,18,122,.08);
  border-radius: var(--tb-radius);
  box-shadow: 0 9px 30px rgba(20,26,60,.07);
  transition: transform .22s ease, box-shadow .22s ease;
}
.tb-card:hover { transform: translateY(-6px); box-shadow: var(--tb-shadow); }
.tb-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #e8eaf3; }
.tb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.tb-card:hover .tb-card-media img { transform: scale(1.04); }
.tb-card-placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  color: rgba(255,255,255,.8);
  background: linear-gradient(135deg, var(--tb-navy-dark), var(--tb-navy));
}
.tb-card-placeholder span { font-size: 3rem; font-weight: 800; letter-spacing: -.1em; }
.tb-card-body { display: flex; flex: 1; flex-direction: column; padding: 25px; }
.tb-meta { display: flex; flex-wrap: wrap; gap: 8px 13px; align-items: center; margin-bottom: 13px; color: var(--tb-muted); font-size: .77rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tb-category { padding: 5px 10px; color: var(--tb-navy); background: #ededff; border-radius: 999px; }
.tb-card-title { margin: 0 0 12px; color: var(--tb-ink); font-size: 1.25rem; line-height: 1.3; }
.tb-card-title a { color: inherit; }
.tb-card-title a:hover { color: var(--tb-navy); }
.tb-excerpt { margin: 0 0 22px; color: var(--tb-muted); font-size: .94rem; }
.tb-read-more { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-size: .88rem; font-weight: 800; }
.tb-read-more span { transition: transform .2s ease; }
.tb-read-more:hover span { transform: translateX(4px); }

.tb-pagination { margin-top: 42px; }
.tb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tb-pagination .page-numbers { min-width: 42px; padding: 9px 13px; text-align: center; background: #fff; border-radius: 10px; }
.tb-pagination .current { color: #fff; background: var(--tb-navy); }

.tb-article-wrap { width: min(880px, calc(100% - 40px)); margin: -30px auto 84px; position: relative; z-index: 3; }
.tb-article {
  padding: clamp(28px, 6vw, 68px);
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--tb-shadow);
}
.tb-article h1 { margin: 0 0 18px; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.08; letter-spacing: -.035em; }
.tb-article .tb-meta { margin-bottom: 28px; }
.tb-featured { margin: 0 0 36px; overflow: hidden; border-radius: 18px; }
.tb-featured img { width: 100%; max-height: 520px; object-fit: cover; }
.tb-entry-content { color: #34394b; font-size: 1.06rem; }
.tb-entry-content h2, .tb-entry-content h3 { margin-top: 1.8em; color: var(--tb-ink); }
.tb-entry-content a { text-decoration: underline; text-decoration-color: rgba(254,215,30,.8); text-underline-offset: 3px; }
.tb-entry-content blockquote { margin: 28px 0; padding: 18px 24px; background: #fffbea; border-left: 4px solid var(--tb-yellow); border-radius: 0 12px 12px 0; }
.tb-entry-content img { border-radius: 14px; }
.tb-breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 24px; color: var(--tb-muted); font-size: .8rem; }
.tb-breadcrumbs a { color: var(--tb-navy); font-weight: 700; }
.tb-article-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 48px; padding: 32px; color: #fff; background: var(--tb-navy); border-radius: 20px; }
.tb-article-cta h2 { margin: 0 0 8px; color: #fff; font-size: 1.55rem; }
.tb-article-cta p { margin: 0; color: rgba(255,255,255,.78); }
.tb-article-cta .tb-eyebrow { margin-bottom: 8px; }
.tb-article-cta .tb-button { flex: 0 0 auto; }
.tb-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--tb-line); }
.tb-post-nav a { display: block; padding: 18px; color: var(--tb-ink); background: var(--tb-bg); border-radius: 14px; font-weight: 700; }
.tb-post-nav .nav-next { text-align: right; }

.tb-empty { padding: 60px 30px; text-align: center; background: #fff; border-radius: var(--tb-radius); box-shadow: var(--tb-shadow); }
.tb-search-form { display: flex; max-width: 540px; margin: 25px auto 0; gap: 10px; }
.tb-search-form input { flex: 1; min-width: 0; padding: 13px 16px; border: 1px solid var(--tb-line); border-radius: 12px; font: inherit; }
.tb-button { padding: 13px 20px; color: var(--tb-navy-dark); background: var(--tb-yellow); border: 0; border-radius: 12px; font: inherit; font-weight: 800; cursor: pointer; }

.tb-site-footer { color: rgba(255,255,255,.76); background: var(--tb-navy-dark); }
.tb-footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; padding: 62px 0 48px; }
.tb-footer-logo { width: 190px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .92; }
.tb-site-footer h3 { margin: 0 0 16px; color: #fff; font-size: 1rem; }
.tb-site-footer p { margin: 6px 0; }
.tb-footer-links { display: grid; gap: 9px; }
.tb-site-footer a { color: rgba(255,255,255,.76); }
.tb-site-footer a:hover { color: #fff; }
.tb-footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }

@media (max-width: 900px) {
  .tb-menu-toggle { display: inline-grid; place-items: center; }
  .tb-nav {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    display: none;
    padding: 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--tb-line);
    border-radius: 16px;
    box-shadow: var(--tb-shadow);
  }
  .tb-nav.is-open { display: flex; }
  .tb-nav a { padding: 11px 12px; }
  .tb-nav a::after { display: none; }
  .tb-post-grid { grid-template-columns: 1fr; }
  .tb-featured-post { grid-template-columns: 1fr; }
  .tb-featured-post__media { min-height: 330px; }
  .tb-footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 782px) { .admin-bar .tb-site-header { top: 46px; } }

@media (max-width: 620px) {
  .tb-container, .tb-article-wrap { width: min(100% - 28px, 1180px); }
  .tb-header-inner { min-height: 124px; }
  .tb-logo { width: auto; height: 100px; }
  .tb-blog-hero { padding: 62px 0 112px; }
  .tb-post-grid { grid-template-columns: 1fr; }
  .tb-featured-post__media { min-height: 240px; }
  .tb-section-head { align-items: flex-start; flex-direction: column; }
  .tb-article { padding: 28px 22px; border-radius: 22px; }
  .tb-post-nav, .tb-footer-main { grid-template-columns: 1fr; }
  .tb-article-cta { align-items: flex-start; flex-direction: column; }
  .tb-post-nav .nav-next { text-align: left; }
  .tb-footer-main { gap: 30px; }
}
