/*
Theme Name: SecureHex Blog
Theme URI: https://securehex.cl/
Author: SecureHex
Author URI: https://securehex.cl/
Description: Tema editorial para blog.securehex.cl, alineado visualmente con SecureHex y optimizado para SEO técnico, legibilidad y contenido de ciberseguridad.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: securehex-blog
*/

:root {
  --sh-bg: #f4f8fc;
  --sh-bg-alt: #e9f0f7;
  --sh-surface: rgba(255, 255, 255, 0.82);
  --sh-surface-strong: #ffffff;
  --sh-surface-dark: #0c1a2b;
  --sh-text: #132235;
  --sh-text-soft: #45617f;
  --sh-text-inverse: #f5f8fc;
  --sh-line: rgba(19, 34, 53, 0.12);
  --sh-line-strong: rgba(19, 34, 53, 0.2);
  --sh-brand: #0266cf;
  --sh-brand-deep: #014a96;
  --sh-brand-soft: rgba(2, 102, 207, 0.1);
  --sh-accent: #2f86db;
  --sh-shadow-lg: 0 28px 70px rgba(10, 27, 48, 0.12);
  --sh-shadow-md: 0 20px 46px rgba(10, 27, 48, 0.08);
  --sh-shadow-sm: 0 14px 34px rgba(10, 27, 48, 0.06);
  --sh-radius-xl: 30px;
  --sh-radius-lg: 22px;
  --sh-radius-md: 16px;
  --sh-content: min(1180px, calc(100% - 2rem));
  --sh-content-narrow: min(760px, calc(100% - 2rem));
  --sh-content-wide: min(1280px, calc(100% - 2rem));
  --sh-header-height: 88px;
  --sh-transition: 180ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Public Sans", "Segoe UI", sans-serif;
  color: var(--sh-text);
  background:
    radial-gradient(circle at top left, rgba(2, 102, 207, 0.08), transparent 28%),
    radial-gradient(circle at right 18%, rgba(47, 134, 219, 0.08), transparent 18%),
    linear-gradient(180deg, #f9fbfd 0%, #f4f8fc 44%, #eef4f9 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.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 {
  clip: auto;
  width: auto;
  height: auto;
  margin: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--sh-surface-dark);
  color: var(--sh-text-inverse);
  z-index: 999;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 110;
  background: rgba(249, 251, 253, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(19, 34, 53, 0.06);
}

.header-shell {
  width: var(--sh-content-wide);
  min-height: var(--sh-header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--sh-brand-deep);
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.brand-copy {
  display: grid;
  gap: 0.15rem;
}

.brand-copy strong {
  font-size: 1.05rem;
}

.brand-copy small {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sh-text-soft);
}

.nav-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--sh-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--sh-text);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform var(--sh-transition), opacity var(--sh-transition);
}

.nav-toggle::before {
  transform: translateY(-6px);
}

.nav-toggle::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] span {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"]::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-nav .menu,
.footer-column .menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  position: relative;
  color: var(--sh-text-soft);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 0.55rem 0;
  transition: color var(--sh-transition);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--sh-brand);
  transition: transform var(--sh-transition);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  color: var(--sh-text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav .current-menu-item > a::after,
.site-nav .current_page_item > a::after {
  transform: scaleX(1);
}

.header-cta {
  display: inline-flex;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform var(--sh-transition),
    box-shadow var(--sh-transition),
    background-color var(--sh-transition),
    border-color var(--sh-transition),
    color var(--sh-transition);
}

.button:hover,
.button:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible {
  transform: translateY(-1px);
}

.button-primary,
.wp-block-button.is-style-fill .wp-block-button__link,
input[type="submit"] {
  background: linear-gradient(135deg, var(--sh-brand) 0%, #1f7de0 100%);
  color: var(--sh-text-inverse);
  box-shadow: 0 18px 34px rgba(2, 102, 207, 0.18);
}

.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
  border-color: rgba(2, 102, 207, 0.18);
  background: rgba(255, 255, 255, 0.66);
  color: var(--sh-brand-deep);
}

.main-shell {
  overflow: clip;
}

.section {
  position: relative;
  padding: 5.5rem 0;
}

.section-shell {
  width: var(--sh-content);
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--sh-brand-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(2, 102, 207, 0.14);
}

.section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sh-brand);
}

.section-header {
  display: grid;
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}

.section-header h1,
.section-header h2,
.hero-copy h1,
.entry-title,
.widget-title,
.archive-highlight h2,
.cta-panel h2,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #102033;
}

.section-header h1,
.hero-copy h1,
.entry-title {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  max-width: 12ch;
}

.section-header h2,
.archive-highlight h2,
.cta-panel h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 3vw, 3.4rem);
}

.section-header p,
.hero-copy p,
.archive-highlight p,
.entry-summary,
.article-intro,
.widget p,
.article-content,
.article-content p {
  margin: 0;
  color: var(--sh-text-soft);
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero-copy h1 span,
.entry-title span {
  color: var(--sh-brand);
}

.hero {
  padding: 4rem 0 5rem;
}

.hero-grid {
  width: var(--sh-content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 2.75rem;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-actions,
.cta-actions,
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.trust-chip,
.meta-badge {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 34, 53, 0.08);
  color: var(--sh-text);
  font-weight: 600;
}

.trust-chip strong,
.meta-badge strong {
  display: block;
  font-size: 0.92rem;
  color: var(--sh-brand-deep);
  margin-bottom: 0.15rem;
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.hero-visual-frame,
.archive-highlight,
.post-card,
.widget-shell,
.article-shell,
.author-box,
.archive-card,
.pagination-shell,
.cta-panel,
.comment-respond,
.comments-area {
  border-radius: var(--sh-radius-xl);
  border: 1px solid rgba(19, 34, 53, 0.08);
  box-shadow: var(--sh-shadow-md);
  background: rgba(255, 255, 255, 0.78);
}

.hero-visual-frame {
  overflow: hidden;
  min-height: 520px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top left, rgba(2, 102, 207, 0.16), transparent 30%);
}

.hero-visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(2, 102, 207, 0.22), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.spotlight-a {
  top: -10%;
  left: -6%;
}

.spotlight-b {
  right: -10%;
  bottom: 6%;
  background: radial-gradient(circle, rgba(38, 144, 245, 0.18), transparent 72%);
}

.content-shell,
.single-shell {
  width: var(--sh-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 1.5rem;
  align-items: start;
}

.content-main,
.single-main {
  display: grid;
  gap: 1.3rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.post-card,
.archive-card {
  display: grid;
  overflow: hidden;
}

.post-card:hover,
.post-card:focus-within,
.archive-card:hover,
.archive-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px rgba(10, 27, 48, 0.12);
}

.post-card-thumb,
.archive-card-thumb,
.featured-media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(2, 102, 207, 0.18), rgba(47, 134, 219, 0.08));
  overflow: hidden;
}

.post-card-thumb img,
.archive-card-thumb img,
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body,
.archive-card-body {
  display: grid;
  gap: 0.95rem;
  padding: 1.45rem;
}

.post-meta,
.entry-meta,
.entry-taxonomies,
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  color: var(--sh-text-soft);
  font-size: 0.94rem;
}

.post-meta time,
.entry-meta time {
  font-variant-numeric: tabular-nums;
}

.post-card h2,
.archive-card h2,
.widget-title,
.comment-reply-title {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: #102033;
}

.post-card p,
.archive-card p {
  margin: 0;
  color: var(--sh-text-soft);
  line-height: 1.7;
}

.article-shell {
  padding: 1.9rem;
}

.article-header {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.featured-media {
  margin: 1.5rem 0 0;
  border-radius: var(--sh-radius-lg);
  border: 1px solid rgba(19, 34, 53, 0.08);
  box-shadow: var(--sh-shadow-sm);
}

.article-content {
  max-width: 68ch;
}

.article-content > * + * {
  margin-top: 1.25rem;
}

.article-content h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-top: 2.7rem;
}

.article-content h3 {
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  margin-top: 2.1rem;
}

.article-content h4 {
  font-size: 1.2rem;
  margin-top: 1.6rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.35rem;
  color: var(--sh-text-soft);
  line-height: 1.75;
}

.article-content li + li {
  margin-top: 0.55rem;
}

.article-content blockquote {
  margin: 2rem 0;
  padding: 1.4rem 1.5rem;
  border-radius: var(--sh-radius-lg);
  background: rgba(2, 102, 207, 0.06);
  color: var(--sh-brand-deep);
  font-weight: 600;
  border: 1px solid rgba(2, 102, 207, 0.14);
}

.article-content code,
.article-content pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.article-content code {
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
  background: rgba(12, 26, 43, 0.08);
  font-size: 0.94em;
}

.article-content pre {
  overflow: auto;
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--sh-radius-lg);
  background: #102033;
  color: #f5f8fc;
}

.article-content a,
.archive-highlight a,
.widget a,
.entry-taxonomies a {
  color: var(--sh-brand-deep);
  text-decoration: underline;
  text-decoration-color: rgba(2, 102, 207, 0.25);
  text-underline-offset: 0.2rem;
}

.article-content a:hover,
.archive-highlight a:hover,
.widget a:hover,
.entry-taxonomies a:hover {
  text-decoration-color: var(--sh-brand);
}

.sidebar {
  display: grid;
  gap: 1.2rem;
}

.widget-shell {
  padding: 1.45rem;
}

.widget-shell ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-shell li + li {
  margin-top: 0.75rem;
}

.author-box,
.archive-highlight,
.pagination-shell,
.comments-area,
.comment-respond {
  padding: 1.6rem;
}

.author-box {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.author-box h2,
.archive-highlight h2 {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: #102033;
}

.pagination-shell,
.posts-navigation,
.post-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.pagination-shell .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.pagination-shell a,
.pagination-shell span,
.posts-navigation a,
.posts-navigation span,
.post-navigation a,
.post-navigation span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(19, 34, 53, 0.08);
  color: var(--sh-brand-deep);
  font-weight: 700;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(19, 34, 53, 0.08);
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 2rem;
  background:
    linear-gradient(135deg, rgba(12, 26, 43, 0.96), rgba(15, 54, 96, 0.94)),
    radial-gradient(circle at top right, rgba(128, 188, 248, 0.18), transparent 30%);
  color: var(--sh-text-inverse);
  box-shadow: 0 26px 64px rgba(5, 18, 34, 0.26);
}

.cta-panel h2,
.cta-panel p {
  color: var(--sh-text-inverse);
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-shell {
  width: var(--sh-content);
  margin: 0 auto;
  padding: 2rem;
  border-radius: 30px;
  background: rgba(12, 26, 43, 0.98);
  color: var(--sh-text-inverse);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.footer-brand p,
.footer-column a,
.footer-column li,
.footer-bottom {
  color: rgba(245, 248, 252, 0.78);
  line-height: 1.7;
}

.footer-column h3 {
  margin: 0 0 0.8rem;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column .menu {
  display: block;
}

.footer-column li + li,
.footer-column a + a {
  margin-top: 0.6rem;
}

.footer-column a {
  display: block;
  transition: color var(--sh-transition);
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
}

.search-form,
.wp-block-search__inside-wrapper {
  display: flex;
  gap: 0.75rem;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(19, 34, 53, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--sh-text);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.comment-list .comment {
  padding: 1rem 0;
  border-top: 1px solid rgba(19, 34, 53, 0.08);
}

.comment-meta {
  color: var(--sh-text-soft);
  font-size: 0.94rem;
}

.comment-form {
  display: grid;
  gap: 1rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
  color: var(--sh-brand-deep);
}

.comment-form-cookies-consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.comment-form-cookies-consent input {
  margin-top: 0.2rem;
}

.archive-empty,
.not-found {
  width: var(--sh-content-narrow);
  margin: 0 auto;
}

.archive-empty .archive-highlight,
.not-found .archive-highlight {
  text-align: left;
}

.alignwide {
  width: min(100%, 1100px);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

@media (max-width: 1100px) {
  .hero-grid,
  .content-shell,
  .single-shell,
  .cta-panel,
  .footer-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 440px;
  }

  .hero-visual-frame {
    min-height: 440px;
  }
}

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

  .site-nav {
    position: fixed;
    inset: calc(var(--sh-header-height) + 1px) 1rem auto;
    display: grid;
    gap: 0.2rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(249, 251, 253, 0.98);
    border: 1px solid rgba(19, 34, 53, 0.08);
    box-shadow: var(--sh-shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--sh-transition), transform var(--sh-transition);
  }

  .site-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.85rem 0;
  }

  .site-nav .menu {
    display: grid;
    gap: 0.2rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-cta {
    display: none;
  }

  .hero,
  .section {
    padding: 4.5rem 0;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .header-shell,
  .hero-grid,
  .section-shell,
  .content-shell,
  .single-shell,
  .footer-shell,
  .archive-empty,
  .not-found {
    width: calc(100% - 1rem);
  }

  .footer-shell {
    padding: 1.6rem;
  }

  .section-header h1,
  .hero-copy h1,
  .entry-title {
    font-size: clamp(2.3rem, 12vw, 3.5rem);
  }

  .brand-copy strong {
    font-size: 0.96rem;
  }

  .brand-copy small {
    font-size: 0.68rem;
  }

  .hero-visual {
    min-height: 320px;
  }

  .hero-visual-frame {
    min-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
