/**
 * Tema01 — estilos front (mobile-first).
 */

:root {
  --tema01-primary: #0b6e4f;
  --tema01-text: #1c1f26;
  --tema01-bg: #f6f7f9;
  --tema01-header-bg: #ffffff;
  --tema01-footer-bg: #1c1f26;
  --tema01-footer-text: #f6f7f9;
  --tema01-muted: #5c6570;
  --tema01-border: #d8dee6;
  --tema01-surface: #ffffff;
  --tema01-wrap-width: 100%;
  --tema01-wrap-max: 1200px;
  --tema01-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tema01-radius: 10px;
  --tema01-space: 1rem;
}

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

html { scroll-behavior: smooth; }

@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;
  }
}

body {
  margin: 0;
  font-family: var(--tema01-font);
  color: var(--tema01-text);
  background: var(--tema01-bg);
  line-height: 1.6;
  min-height: 100vh;
}

img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

a { color: var(--tema01-primary); }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--tema01-primary);
  outline-offset: 2px;
}

.wrap {
  width: var(--tema01-wrap-width, 100%);
  max-width: var(--tema01-wrap-max, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--tema01-space);
  padding-right: var(--tema01-space);
  box-sizing: border-box;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--tema01-text);
  display: block;
  font-weight: 700;
  height: auto;
  left: 0.5rem;
  line-height: normal;
  padding: 0.75rem 1rem;
  text-decoration: none;
  top: 0.5rem;
  width: auto;
  z-index: 100000;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 100000;
}
.skip-link:focus {
  left: 0.5rem;
  background: #fff;
  padding: 0.75rem 1rem;
}

/* Header */
.site-header {
  background: var(--tema01-header-bg);
  border-bottom: 1px solid var(--tema01-border);
}
.tema01-header-sticky .site-header {
  position: sticky;
  top: 0;
  z-index: 200;
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-branding { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.site-title { margin: 0; font-size: 1.25rem; }
.site-title a { color: var(--tema01-text); text-decoration: none; }
.site-description { margin: 0; color: var(--tema01-muted); font-size: 0.9rem; }
.custom-logo-link img { display: block; max-height: 64px; width: auto; }

.main-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

@media (min-width: 782px) {
  .tema01-menu-align-left .site-header__inner { justify-content: flex-start; }
  .tema01-menu-align-left .main-navigation { flex: 1 1 auto; }
  .tema01-menu-align-left .main-navigation > ul { justify-content: flex-start; }

  .tema01-menu-align-center .site-header__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }
  .tema01-menu-align-center .site-branding { justify-self: start; }
  .tema01-menu-align-center .main-navigation {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
  }
  .tema01-menu-align-center .main-navigation > ul { justify-content: center; }

  .tema01-menu-align-right .site-header__inner { justify-content: space-between; }
  .tema01-menu-align-right .main-navigation { margin-left: auto; }
  .tema01-menu-align-right .main-navigation > ul { justify-content: flex-end; }
}
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation > ul {
  display: none;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.main-navigation.toggled > ul,
.main-navigation.toggled .header-search { display: flex; }
.main-navigation a {
  display: block;
  padding: 0.5rem 0.25rem;
  color: var(--tema01-text);
  text-decoration: none;
  font-weight: 600;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--tema01-primary); }
.sub-menu {
  margin-left: 1rem;
  border-left: 2px solid var(--tema01-border);
  padding-left: 0.5rem;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--tema01-primary);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font: inherit;
}
.menu-toggle__icon {
  width: 1.1rem;
  height: 2px;
  background: #fff;
  box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
}

.header-search { display: none; width: 100%; }
.search-form { display: flex; gap: 0.35rem; }
.search-field, .search-submit, .comment-form input, .comment-form textarea {
  font: inherit;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--tema01-border);
  border-radius: 6px;
}
.search-submit {
  background: var(--tema01-primary);
  color: #fff;
  border: 0;
  cursor: pointer;
}

@media (min-width: 782px) {
  .menu-toggle { display: none; }
  .main-navigation > ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    width: auto;
  }
  .header-search { display: block; width: auto; }
  .main-navigation li { position: relative; }
  .main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background: var(--tema01-surface);
    border: 1px solid var(--tema01-border);
    border-radius: 6px;
    padding: 0.35rem;
    margin: 0;
    z-index: 20;
  }
  .main-navigation li:hover > .sub-menu,
  .main-navigation li:focus-within > .sub-menu { display: block; }
}

/* Content */
.site-content { padding: 1.5rem 0 3rem; }
.site-content__inner { display: grid; gap: 1.5rem; }
@media (min-width: 960px) {
  .site-content.has-sidebar.sidebar-right .site-content__inner,
  .has-sidebar.sidebar-right .site-content__inner {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .has-sidebar.sidebar-left .site-content__inner {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .sidebar-left .site-main { order: 2; }
  .sidebar-left .widget-area { order: 1; }
}

.site-main { min-width: 0; }
.entry-header { margin-bottom: 1rem; }
.entry-title { margin: 0 0 0.35rem; font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.02em; }
.entry-meta, .entry-footer { color: var(--tema01-muted); font-size: 0.9rem; }
.entry-content > * + * { margin-top: 1rem; }
.entry-content h2, .entry-content h3 { line-height: 1.25; }
.post-thumbnail { margin: 0 0 1rem; }
.post-thumbnail img { border-radius: var(--tema01-radius); display: block; width: 100%; }
article.post, article.page { background: var(--tema01-surface); border: 1px solid var(--tema01-border); border-radius: var(--tema01-radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.alignwide { max-width: var(--tema01-wrap-max, 1200px); }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

.wp-block-image img { height: auto; }

.tema01-breadcrumbs { font-size: 0.85rem; color: var(--tema01-muted); }
.tema01-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0; margin: 0 0 1rem; }
.tema01-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 0.35rem; color: var(--tema01-border); }

.widget { margin-bottom: 1.5rem; }
.widget-title { font-size: 1.05rem; margin: 0 0 0.5rem; }

.nav-links, .pagination { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.nav-links a, .page-numbers { padding: 0.35rem 0.7rem; border: 1px solid var(--tema01-border); border-radius: 6px; text-decoration: none; background: var(--tema01-surface); }

/* Footer */
.site-footer { background: var(--tema01-footer-bg); color: var(--tema01-footer-text); margin-top: auto; }
.site-footer a { color: var(--tema01-footer-text); }
.footer-widgets { padding: 2rem 0 1rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-widgets__inner { display: grid; gap: 1.25rem; }
@media (min-width: 782px) {
  .footer-widgets--cols-2 { grid-template-columns: 1fr 1fr; }
  .footer-widgets--cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.site-info { padding: 1rem 0 1.5rem; font-size: 0.9rem; }
.site-info__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center; }
.footer-menu, .social-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; padding: 0; }

.comments-area { margin-top: 2rem; }
.comment-list { list-style: none; padding: 0; }

.template-full-width .entry-content,
.template-landing .entry-content { max-width: none; }

.plucap-wrap { /* El plugin controla su propio ancho interno */ }
