/*
Theme Name:  PsicosTheme
Theme URI:   https://tusitio.com
Description: Tema base limpio para web de tests psicotécnicos.
Version:     1.0.0
Author:      Tu Nombre
Author URI:  https://tusitio.com
Text Domain: psicostheme
Tags:        clean, responsive, gutenberg
*/

/* =============================================
   VARIABLES GLOBALES
   ============================================= */
:root {
  --color-primary:     #2563eb;
  --color-primary-dk:  #1d4ed8;
  --color-secondary:   #0ea5e9;
  --color-accent:      #7c3aed;
  --color-bg:          #f8fafc;
  --color-surface:     #ffffff;
  --color-text:        #1e293b;
  --color-text-muted:  #64748b;
  --color-border:      #e2e8f0;

  --font-base:   'Inter', system-ui, sans-serif;
  --font-size:   16px;
  --line-height: 1.6;

  --radius:  8px;
  --radius-lg: 16px;
  --shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);

  --container: 1200px;
  --gap:       1.5rem;
}

/* =============================================
   RESET BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: var(--font-size); scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dk); }

ul, ol { list-style: none; }

/* =============================================
   TIPOGRAFÍA
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

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

/* =============================================
   LAYOUT
   ============================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.site-content {
  display: flex;
  gap: var(--gap);
  padding: 2rem 0;
}

.content-area { flex: 1; min-width: 0; }
.widget-area   { width: 300px; flex-shrink: 0; }

/* Sin sidebar */
.no-sidebar .content-area { max-width: 100%; }

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-branding .site-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}
.site-branding .site-title a { color: inherit; }
.site-branding .site-description {
  font-size: .75rem;
  color: var(--color-text-muted);
}

/* Nav */
.main-navigation ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.main-navigation a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color .2s;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--color-primary); }

/* Burger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: .3s;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--color-text);
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--gap);
  margin-bottom: 2rem;
}

.site-info {
  border-top: 1px solid #334155;
  padding-top: 1rem;
  font-size: .8rem;
  text-align: center;
  color: #94a3b8;
}

/* =============================================
   CARDS (reutilizable para tests, posts, etc.)
   ============================================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-body { padding: 1.25rem; }

/* =============================================
   BOTONES
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dk); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

/* =============================================
   GUTENBERG — compatibilidad base
   ============================================= */
.wp-block-image img { border-radius: var(--radius); }
.wp-block-button__link { border-radius: var(--radius) !important; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .site-content { flex-direction: column; }
  .widget-area  { width: 100%; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem var(--gap);
  }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; gap: .75rem; }
  .nav-toggle { display: block; }
}