/*
 * Nodinet Theme — global.css
 * Reset, header, footer, tipografía, utilidades.
 * Sin colores hardcodeados — todo usa variables de style.css
 */

/* ── RESET ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
a { text-decoration: none; transition: var(--nd-transition); }

/* ── BASE ─────────────────────────────────── */
body {
  font-family: var(--nd-font-body);
  font-size: var(--nd-font-size-base);
  line-height: var(--nd-line-height-base);
  color: var(--nd-color-text);
  background: var(--nd-color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nd-font-heading);
  line-height: 1.15;
  color: var(--nd-color-text);
  margin-top: 0;
}

p { color: var(--nd-color-text-soft); margin-top: 0; }
a { color: var(--nd-color-primary); }
a:hover { color: var(--nd-color-primary-dark); }

/* ── HEADER ───────────────────────────────── */
.nd-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nd-header-bg);
  border-bottom: 1px solid var(--nd-header-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  height: var(--nd-header-height);
}

.nd-header-inner {
  max-width: var(--nd-container-max);
  margin: 0 auto;
  padding: 0 var(--nd-container-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.nd-logo { display: flex; align-items: center; flex-shrink: 0; }
.nd-logo-img { height: 40px; width: auto; display: block; }
.nd-logo-text {
  font-family: var(--nd-font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nd-color-primary);
}

/* Nav desktop */
.nd-nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nd-nav-list li a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--nd-color-text-soft);
  letter-spacing: .03em;
}

.nd-nav-list li a:hover,
.nd-nav-list li.current-menu-item > a {
  color: var(--nd-color-primary);
}

/* Hamburguesa */
.nd-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nd-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nd-color-text);
  border-radius: 2px;
  transition: var(--nd-transition);
}

.nd-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nd-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nd-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú mobile */
.nd-nav-mobile {
  display: none;
  background: var(--nd-header-bg);
  border-top: 1px solid var(--nd-header-border);
  padding: 16px var(--nd-container-padding) 20px;
}

.nd-nav-mobile.is-open { display: block; }

.nd-nav-mobile-list { margin: 0; padding: 0; }
.nd-nav-mobile-list li { border-bottom: 1px solid var(--nd-color-border); }
.nd-nav-mobile-list li:last-child { border-bottom: none; }
.nd-nav-mobile-list li a {
  display: block;
  padding: 12px 0;
  font-size: .95rem;
  color: var(--nd-color-text);
}
.nd-nav-mobile-list li a:hover { color: var(--nd-color-primary); }

/* ── MAIN ─────────────────────────────────── */
.nd-main {
  min-height: calc(100vh - var(--nd-header-height));
}

/* ── FOOTER ───────────────────────────────── */
.nd-footer {
  background: var(--nd-color-text);
  color: rgba(255,255,255,.75);
  padding-top: 56px;
}

.nd-footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.nd-footer-logo { height: 36px; width: auto; margin-bottom: 12px; }
.nd-footer-logo-text {
  font-family: var(--nd-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 12px;
}

.nd-footer-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin: 0;
}

.nd-footer-nav-list { margin: 0; padding: 0; }
.nd-footer-nav-list li { margin-bottom: 10px; }
.nd-footer-nav-list li a {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
}
.nd-footer-nav-list li a:hover { color: #fff; }

.nd-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
}

.nd-footer-bottom p {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  margin: 0;
  text-align: center;
}

.nd-footer-bottom a {
  color: rgba(255,255,255,.6);
}
.nd-footer-bottom a:hover { color: #fff; }

/* ── CONTENEDOR ───────────────────────────── */
.nd-container {
  max-width: var(--nd-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--nd-container-padding);
  padding-right: var(--nd-container-padding);
}

/* ── SECCIONES ────────────────────────────── */
.nd-section     { padding-top: 72px; padding-bottom: 72px; }
.nd-section-sm  { padding-top: 48px; padding-bottom: 48px; }

/* ── LABEL ────────────────────────────────── */
.nd-label {
  display: block;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--nd-color-primary);
  margin-bottom: 12px;
}
.nd-label--light { color: var(--nd-color-primary-light); }

/* ── BLOG — entrada individual ────────────── */
.nd-post { max-width: 720px; margin: 0 auto; }
.nd-post-thumbnail { border-radius: var(--nd-radius); overflow: hidden; margin-bottom: 28px; }
.nd-post-thumbnail img { width: 100%; height: auto; }
.nd-post-meta { margin-bottom: 12px; }
.nd-post-date { font-size: .8rem; color: var(--nd-color-text-soft); }
.nd-post-title { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 28px; }
.nd-post-content { font-size: 1rem; line-height: 1.8; }
.nd-post-content p { margin-bottom: 20px; }
.nd-post-footer { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--nd-color-border); }

/* ── BLOG — listado ───────────────────────── */
.nd-archive-header { margin-bottom: 48px; }
.nd-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.nd-blog-card { background: var(--nd-color-white); border-radius: var(--nd-radius); overflow: hidden; box-shadow: var(--nd-shadow-sm); }
.nd-blog-card-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.nd-blog-card-body { padding: 20px; }
.nd-blog-card-date { font-size: .75rem; color: var(--nd-color-text-soft); display: block; margin-bottom: 8px; }
.nd-blog-card-title { font-size: 1.1rem; margin-bottom: 10px; }
.nd-blog-card-title a { color: var(--nd-color-text); }
.nd-blog-card-title a:hover { color: var(--nd-color-primary); }
.nd-blog-card-excerpt { font-size: .88rem; margin-bottom: 16px; }
.nd-pagination { text-align: center; }

/* ── UTILIDADES ───────────────────────────── */
.nd-text-center { text-align: center; }
.nd-text-muted  { color: var(--nd-color-text-soft); }
.nd-divider { border: none; border-top: 1px solid var(--nd-color-border); margin: 0; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
  .nd-nav  { display: none; }
  .nd-hamburger { display: flex; }
  .nd-header { height: auto; min-height: var(--nd-header-height); }
  .nd-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .nd-blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .nd-blog-grid { grid-template-columns: 1fr; }
}
