/*
=============================================================
GUÍA DE ESTILOS — herramientasiaestudio.com
=============================================================
Aplicar en WordPress: Apariencia > Personalizar > CSS adicional
O en el archivo style.css del tema hijo
=============================================================
*/

/* === COLORES PRINCIPALES === */
:root {
  --color-primary: #1a73e8;       /* Azul principal */
  --color-primary-dark: #1557b0;  /* Azul oscuro (hover) */
  --color-primary-light: #e8f0fe; /* Azul muy claro (fondos) */
  --color-text: #202124;          /* Negro/gris oscuro (texto) */
  --color-text-secondary: #5f6368;/* Gris medio (texto secundario) */
  --color-bg: #ffffff;            /* Blanco (fondo principal) */
  --color-bg-alt: #f8f9fa;        /* Gris claro (fondo alternativo) */
  --color-border: #dadce0;        /* Gris borde */
  --color-success: #34a853;       /* Verde (CTA, positivo) */
}

/* === TIPOGRAFÍA === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.2rem;
}

/* === ENLACES === */
a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* === TARJETAS DE HERRAMIENTAS === */
.herramientas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.herramienta-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.herramienta-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.herramienta-card h3 {
  color: var(--color-primary);
  margin-top: 0;
}

/* === TARJETAS DE CATEGORÍA === */
.categorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.categoria-card {
  display: block;
  background: var(--color-primary-light);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.categoria-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 115, 232, 0.15);
  text-decoration: none;
}

.categoria-card h3 {
  color: var(--color-primary);
  margin-top: 0;
}

/* === BOTÓN CTA === */
.cta-button {
  display: inline-block;
  background: var(--color-primary);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta-button:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
}

/* === TABLAS === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th {
  background: var(--color-primary);
  color: #ffffff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
}

tr:nth-child(even) {
  background: var(--color-bg-alt);
}

/* === BLOCKQUOTES (prompts) === */
blockquote {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
  font-style: normal;
}

blockquote p {
  margin: 0;
}

/* === LISTAS === */
ul, ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .herramientas-grid,
  .categorias-grid {
    grid-template-columns: 1fr;
  }
  table { font-size: 0.85rem; }
  th, td { padding: 8px 10px; }
}


/* === SITE LAYOUT === */
* { box-sizing: border-box; margin: 0; padding: 0; }

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.logo-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.logo:hover { text-decoration: none; opacity: 0.85; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu a {
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-menu a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text);
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 200;
}

.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.dropdown-menu a:hover {
  background: var(--color-bg-alt);
}

/* === BREADCRUMBS === */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
}

.breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.bc-sep {
  margin: 0 0.4rem;
  color: var(--color-border);
}

/* === ARTICLE META BAR === */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-category {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.article-reading-time {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* === TABLE OF CONTENTS === */
.toc {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.toc ol {
  padding-left: 1.25rem;
  margin: 0;
}

.toc li {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.toc a {
  color: var(--color-primary);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* === AD CONTAINERS === */
.ad-container {
  margin: 2rem 0;
  text-align: center;
  min-height: 90px;
}

.ad-top { margin-top: 1rem; }
.ad-bottom { margin-bottom: 1rem; }

/* === RELATED ARTICLES === */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.related-articles h2 {
  margin-bottom: 1.25rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.related-card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: block;
}

.related-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-cat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.related-card h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
  line-height: 1.3;
}

.related-card p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* === MAIN === */
main.container {
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  min-height: 60vh;
}

/* === FOOTER === */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-copy {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* === BLOG LIST === */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.blog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.blog-card h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.blog-card h2 a {
  color: var(--color-text);
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--color-primary);
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
  background: var(--color-primary-light);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

.blog-read-time {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.blog-card > p:last-child {
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(32, 33, 36, 0.97);
  color: #fff;
  z-index: 9999;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.cookie-inner {
  max-width: 900px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-inner p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-inner a {
  color: #8ab4f8;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.cookie-accept {
  background: var(--color-primary);
  color: #fff;
}

.cookie-accept:hover {
  background: var(--color-primary-dark);
}

.cookie-reject {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-reject:hover {
  border-color: rgba(255,255,255,0.6);
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-primary-dark);
}

/* === 404 PAGE === */
.error-404 {
  text-align: center;
  padding: 4rem 1rem;
}

.error-404 h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.error-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.cta-secondary {
  background: var(--color-bg-alt) !important;
  color: var(--color-primary) !important;
  border: 1px solid var(--color-primary);
}

.cta-secondary:hover {
  background: var(--color-primary-light) !important;
}

/* === CONTACT FORM === */
.contact-form {
  max-width: 600px;
  margin: 1.5rem 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.form-checkbox input { margin-top: 4px; }
.form-checkbox label { font-weight: 400; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }

  .nav-menu.open { display: flex; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .header-inner { max-width: 100%; }
  .footer-inner { max-width: 100%; }

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

  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }

  .back-to-top {
    bottom: 5rem;
    right: 1rem;
  }
}
