/* ================================================================
   Trascender Theme — main.css
   Paleta: Blanco #fff | Teal #1EA69A | Texto #292B2C
   Tipografía: Playfair Display (títulos) + Roboto (cuerpo)
   ================================================================ */

/* ----------------------------------------------------------------
   Variables
   ---------------------------------------------------------------- */
:root {
  --t-teal:       #1EA69A;
  --t-teal-dark:  #319b93;
  --t-teal-pale:  #e8f7f6;

  --t-text:       #292B2C;
  --t-text-soft:  #7e7e7e;
  --t-text-muted: #aaaaaa;

  --t-bg:         #ffffff;
  --t-bg-soft:    #f6f8f8;
  --t-border:     #e0e0e0;

  --t-error:      #e05252;
  --t-success:    #2e9e5b;

  --t-radius:     8px;
  --t-radius-sm:  5px;
  --t-shadow:     0 2px 12px rgba(0,0,0,.07);
  --t-shadow-md:  0 4px 24px rgba(0,0,0,.1);
  --t-transition: .2s ease;

  --t-font-body:  'Roboto', Arial, sans-serif;
  --t-font-title: 'Playfair Display', Georgia, serif;

  --t-container:  1140px;
  --t-header-h:   68px;
}

/* ----------------------------------------------------------------
   Reset mínimo
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--t-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--t-text);
  background: var(--t-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--t-teal); text-decoration: none; }
a:hover { color: var(--t-teal-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--t-font-title);
  font-weight: 700;
  line-height: 1.25;
  color: var(--t-text);
  margin: 0 0 .75em;
}
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: clamp(20px, 3vw, 28px); }
h3 { font-size: clamp(17px, 2.5vw, 22px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5em; margin: 0 0 1em; }
li { margin-bottom: .3em; }

hr {
  border: none;
  border-top: 1px solid var(--t-border);
  margin: 2em 0;
}

/* ----------------------------------------------------------------
   Contenedor
   ---------------------------------------------------------------- */
.container {
  max-width: var(--t-container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--page    { max-width: 820px; }
.container--profile { max-width: 960px; }
.container--narrow  { max-width: 600px; }

/* ----------------------------------------------------------------
   Botones del tema
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--t-radius-sm);
  font-family: var(--t-font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--t-transition), color var(--t-transition),
              border-color var(--t-transition), box-shadow var(--t-transition);
  line-height: 1.3;
  white-space: nowrap;
}
.btn--primary {
  background: var(--t-teal);
  color: #fff;
  border-color: var(--t-teal);
}
.btn--primary:hover {
  background: var(--t-teal-dark);
  border-color: var(--t-teal-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,166,154,.3);
}
.btn--outline {
  background: transparent;
  color: var(--t-teal);
  border-color: var(--t-teal);
}
.btn--outline:hover {
  background: var(--t-teal);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--t-text-soft);
  border-color: var(--t-border);
}
.btn--ghost:hover { border-color: var(--t-teal); color: var(--t-teal); }
.btn--sm  { padding: 7px 16px; font-size: 13px; }
.btn--lg  { padding: 14px 34px; font-size: 16px; }

/* Botones del header */
.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--t-radius-sm);
  font-family: var(--t-font-body);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--t-transition), color var(--t-transition), border-color var(--t-transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-header--primary {
  background: var(--t-teal);
  color: #fff;
  border-color: var(--t-teal);
}
.btn-header--primary:hover {
  background: var(--t-teal-dark);
  border-color: var(--t-teal-dark);
  color: #fff;
}
.btn-header--ghost {
  background: transparent;
  color: var(--t-text-soft);
  border-color: var(--t-border);
}
.btn-header--ghost:hover { border-color: var(--t-teal); color: var(--t-teal); }

/* ----------------------------------------------------------------
   Header
   ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--t-border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  height: var(--t-header-h);
}

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

/* Branding */
.site-branding { flex-shrink: 0; }
.custom-logo-link img,
.site-header .custom-logo { max-height: 48px; width: auto; }
.site-title-link {
  font-family: var(--t-font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--t-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-title-link:hover { color: var(--t-teal); }

/* Nav */
.site-nav { flex: 1; }

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-menu li { position: relative; }
.nav-menu a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--t-text-soft);
  text-decoration: none;
  border-radius: var(--t-radius-sm);
  transition: color var(--t-transition), background var(--t-transition);
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
  color: var(--t-teal);
  background: var(--t-teal-pale);
}

/* Submenú */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow-md);
  min-width: 200px;
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 100;
}
.nav-menu li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a {
  padding: 8px 18px;
  border-radius: 0;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--t-text-soft);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius-sm);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--t-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------------
   Layout principal
   ---------------------------------------------------------------- */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-content  { flex: 1; }
.site-main          { padding: 48px 0; }
.site-main--profile { padding: 36px 0; }
.site-main--home    { padding: 0; }  /* front-page: sin padding para que las secciones lleguen al borde */

/* ----------------------------------------------------------------
   Encabezado de página
   ---------------------------------------------------------------- */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--t-teal);
}
.page-title {
  font-family: var(--t-font-title);
  font-size: clamp(22px, 3vw, 30px);
  color: var(--t-text);
  margin: 0;
}

/* ----------------------------------------------------------------
   Contenido de página / entrada
   ---------------------------------------------------------------- */
.entry-content {
  line-height: 1.75;
  color: var(--t-text);
}
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.5em; }
.entry-content a   { color: var(--t-teal); text-decoration: underline; }
.entry-content a:hover { color: var(--t-teal-dark); }
.entry-content img { border-radius: var(--t-radius); margin: 1em 0; }

/* ----------------------------------------------------------------
   Front-page: Hero
   ---------------------------------------------------------------- */

/* Hero base — sin imagen */
.fp-hero {
  position: relative;
  background: linear-gradient(135deg, var(--t-teal-pale) 0%, #fff 60%);
  border-bottom: 1px solid var(--t-border);
  padding: 96px 0 88px;
  overflow: hidden;
}

/* Hero con imagen de fondo */
.fp-hero--has-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 120px 0 110px;
}

/* Overlay oscuro (solo visible con imagen) */
.fp-hero-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
}
.fp-hero--has-image .fp-hero-overlay { display: block; }

.fp-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.fp-hero-title {
  font-family: var(--t-font-title);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--t-text);
}
.fp-hero--has-image .fp-hero-title { color: #fff; }

.fp-hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: var(--t-text-soft);
  margin: 0 auto;
  max-width: 580px;
}
.fp-hero--has-image .fp-hero-subtitle { color: rgba(255,255,255,.85); }

/* ----------------------------------------------------------------
   Front-page: Introducción
   ---------------------------------------------------------------- */
.fp-intro {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--t-border);
}
.fp-intro-text {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 17px;
  line-height: 1.8;
  color: var(--t-text-soft);
}
.fp-intro-text p { margin: 0 0 .8em; }
.fp-intro-text p:last-child { margin: 0; }
.fp-intro-text strong { color: var(--t-text); }
.fp-intro-text a { color: var(--t-teal); }

/* ----------------------------------------------------------------
   Front-page: Secciones de registro (dos columnas)
   ---------------------------------------------------------------- */
.fp-register {
  padding: 0;
}

.fp-register-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
  width: 100%;
  max-width: 100%;
}

.fp-register-col {
  display: flex;
  align-items: stretch;
}

.fp-register-col--seeker {
  background: #fff;
  border-right: 1px solid var(--t-border);
}

.fp-register-col--medium {
  background: var(--t-teal);
}

.fp-register-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 56px;
  width: 100%;
  gap: 24px;
}

.fp-register-card-icon {
  color: var(--t-teal);
  line-height: 1;
}
.fp-register-col--medium .fp-register-card-icon { color: rgba(255,255,255,.7); }

/* Material Symbols dentro de las secciones de registro */
.fp-register-card-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
  display: block;
  line-height: 1;
}

.fp-register-title {
  font-family: var(--t-font-title);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.2;
  margin: 0;
  color: var(--t-text);
}
.fp-register-col--medium .fp-register-title { color: #fff; }

.fp-register-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--t-text-soft);
  max-width: 400px;
}
.fp-register-desc p { margin: 0 0 .6em; }
.fp-register-desc p:last-child { margin: 0; }
.fp-register-col--medium .fp-register-desc { color: rgba(255,255,255,.8); }

.fp-register-btn { margin-top: 8px; }

/* Botón outline en columna teal: se invierte a blanco */
.fp-register-col--medium .btn--primary {
  background: #fff;
  color: var(--t-teal);
  border-color: #fff;
}
.fp-register-col--medium .btn--primary:hover {
  background: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

/* ----------------------------------------------------------------
   Front-page: contenido extra (bloques del editor)
   ---------------------------------------------------------------- */
.fp-extra-content {
  padding: 56px 0;
  border-top: 1px solid var(--t-border);
}

/* ----------------------------------------------------------------
   Responsive front-page
   ---------------------------------------------------------------- */
@media (max-width: 840px) {
  .fp-register-inner {
    grid-template-columns: 1fr;
  }
  .fp-register-col--seeker {
    border-right: none;
    border-bottom: 1px solid var(--t-border);
  }
  .fp-register-card {
    padding: 48px 32px;
    align-items: center;
    text-align: center;
  }
  .fp-register-desc { max-width: 100%; }
}

@media (max-width: 480px) {
  .fp-hero { padding: 72px 0 60px; }
  .fp-hero--has-image { padding: 80px 0 70px; }
  .fp-register-card { padding: 40px 24px; }
  .fp-register-btn { width: 100%; justify-content: center; }
}

/* ----------------------------------------------------------------
   Blog / Posts grid
   ---------------------------------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  overflow: hidden;
  box-shadow: var(--t-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-transition), transform var(--t-transition);
}
.post-card:hover { box-shadow: var(--t-shadow-md); transform: translateY(-2px); }
.post-card-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card-body     { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-title    { margin: 0; font-size: 18px; }
.post-card-title a  { color: var(--t-text); }
.post-card-title a:hover { color: var(--t-teal); }
.post-card-meta     { font-size: 12px; color: var(--t-text-muted); margin: 0; }
.post-card-excerpt  { font-size: 14px; color: var(--t-text-soft); flex: 1; }
.wp-pagenavi,
.navigation.posts-navigation {
  margin-top: 40px;
  text-align: center;
  font-family: var(--t-font-body);
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */
.site-footer {
  background: var(--t-bg-soft);
  border-top: 1px solid var(--t-border);
  padding-top: 56px;
}
.footer-inner {
  max-width: var(--t-container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Grid de 4 columnas iguales — !important para ganar a estilos de WP */
.footer-widgets {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  gap: 40px !important;
  padding-bottom: 48px !important;
  padding-left: 0 !important;
  list-style: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}

/* Cada columna ocupa exactamente su celda del grid */
.footer-widget-col {
  display: block !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Cada widget dentro de la columna */
.footer-widget-col .footer-widget,
.footer-widget-col > div,
.footer-widget-col > section {
  display: block !important;
  width: 100% !important;
}

.footer-widget-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--t-text-soft);
  margin: 0 0 14px;
  padding: 0;
}
.footer-bottom {
  border-top: 1px solid var(--t-border);
  padding: 16px 0;
}
.footer-copy {
  font-size: 13px;
  color: var(--t-text-muted);
  margin: 0;
  text-align: center;
}
.footer-copy a { color: var(--t-text-soft); }
.footer-copy a:hover { color: var(--t-teal); }

/* ----------------------------------------------------------------
   404
   ---------------------------------------------------------------- */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}
.error-404-title {
  font-size: 96px;
  color: var(--t-teal);
  margin-bottom: 12px;
  line-height: 1;
}
.error-404-text {
  font-size: 18px;
  color: var(--t-text-soft);
  margin-bottom: 28px;
}

/* ----------------------------------------------------------------
   No results
   ---------------------------------------------------------------- */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--t-text-soft);
}

/* ----------------------------------------------------------------
   WordPress core classes
   ---------------------------------------------------------------- */
.alignleft  { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--t-text-muted); text-align: center; }
.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;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-widgets {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 28px !important;
  }
}
@media (max-width: 540px) {
  .footer-widgets {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
}

@media (max-width: 768px) {
  :root { --t-header-h: 60px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--t-header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--t-border);
    box-shadow: var(--t-shadow-md);
    padding: 16px 24px 20px;
    z-index: 999;
  }
  .site-nav.is-open { display: block; }

  .site-header { position: sticky; }
  .header-inner { flex-wrap: wrap; }

  .nav-menu { flex-direction: column; align-items: flex-start; gap: 2px; }
  .nav-menu a { padding: 10px 12px; font-size: 15px; }
  .nav-menu .sub-menu { position: static; box-shadow: none; border: none; padding-left: 16px; display: block; }

  .header-actions {
    order: -1;
    margin-left: auto;
    margin-right: 10px;
  }
  .header-user-name { display: none; }

  .hero { padding: 48px 0 40px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn--lg { width: 100%; max-width: 320px; justify-content: center; }

  .site-main { padding: 32px 0; }

  .posts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .error-404-title { font-size: 64px; }
}

/* ----------------------------------------------------------------
   Correcciones contra estilos de WordPress core y plugins
   ---------------------------------------------------------------- */

/* WordPress inyecta estilos en widgets — normalizamos sin romper el grid */
.footer-widget-col ul,
.footer-widget-col ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-widget-col li { margin-bottom: 6px; }
.footer-widget-col a  { color: var(--t-text-soft); font-size: 14px; text-decoration: none; }
.footer-widget-col a:hover { color: var(--t-teal); }
.footer-widget-col p  { font-size: 14px; color: var(--t-text-soft); margin: 0 0 6px; }

/* Forzar que el grid de registro no colapse por herencia de max-width */
.fp-register,
.fp-register-inner,
.fp-register-col {
  box-sizing: border-box;
}

/* WordPress puede poner display:block en elementos dentro del content */
.site-main--home .fp-register-inner {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
}

@media (max-width: 840px) {
  .site-main--home .fp-register-inner {
    grid-template-columns: 1fr !important;
  }
}
