:root {
  --primary: #10cfc9;
  --primary-strong: #00afaa;
  --bg: #fffffe;
  --fg: #383a41;
  --muted: #e5e1e6;
  --secondary: #54565a;
  --accent: #655dc6;
  --border: #d4d6d7;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a, button { -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Open Sans", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1rem, 5vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.logo {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-dot {
  width: 9px;
  height: 9px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}
.sidebar-logo-img {
  height: 60px;
  width: auto;
  display: block;
}
.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}
.nav-link:hover {
  background: var(--muted);
  color: var(--fg);
}
.nav-link--user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-strong);
  border-color: var(--primary-strong);
}
.nav-link--user:hover {
  background: rgba(16, 207, 201, 0.08);
}

/* Hero */
.hero {
  background: linear-gradient(160deg, #f4fffe 0%, #eaf9f8 60%, #f8f0ff 100%);
  border-bottom: 1px solid var(--border);
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 5vw, 3rem);
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-strong);
  background: rgba(16, 207, 201, 0.1);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary-strong);
}
.hero p {
  color: var(--secondary);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 480px;
  margin: 0 auto;
}

/* Content */
.main {
  /* Más ancho para que quepan más tarjetas en horizontal (hasta ~8) antes de bajar */
  max-width: 1800px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 3rem);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-label {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Grid — responsive: tarjetas cómodas (~290px) que se acomodan en horizontal
   y bajan al llenar la fila (1 col móvil → 2-3 tablet → 4-6 escritorio) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.card:hover {
  box-shadow:
    0 8px 32px rgba(16, 207, 201, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}
.card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: var(--muted);
}
.card-img-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, #f0fffe, #e8f4f4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.card-author {
  font-weight: 600;
  color: var(--primary-strong);
}
.card-date::before {
  content: "·";
  margin-right: 0.45rem;
}
.card-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.card-excerpt {
  font-size: 0.875rem;
  color: var(--secondary);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.read-more {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--primary-strong);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.15s;
}
.card:hover .read-more {
  gap: 0.5rem;
}

/* Categories */
.card-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.cat-tag {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(101, 93, 198, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

/* Empty */
.empty {
  text-align: center;
  padding: 5rem 2rem;
}
.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  opacity: 0.25;
}
.empty h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.empty p {
  color: var(--secondary);
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .grid { gap: 1rem; }
  .card-body { padding: 1rem; }
  .card-img, .card-img-placeholder { height: 160px; }
  .section-header { margin-bottom: 1.25rem; }
}

/* Footer */
.footer {
  background: var(--fg);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.8rem;
  margin-top: 4rem;
}
.footer strong {
  color: rgba(255, 255, 255, 0.75);
}
.footer a {
  color: var(--primary);
}
