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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e0f2fe;
  color: #0f172a;
  line-height: 1.6;
}

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========= HEADER ========= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 10px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  white-space: nowrap;
}

.logo span {
  color: #fde047;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.2s, transform 0.1s;
}

nav a:hover {
  background: rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

/* ========= MAIN & HERO ========= */
main {
  padding: 26px 0 40px;
}

.hero {
  margin-top: 12px;
  margin-bottom: 28px;
  background: radial-gradient(circle at top left, #4f46e5, #ec4899 45%, #f97316 90%);
  border-radius: 22px;
  padding: 26px 22px 24px;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(15,23,42,0.35);
}

.hero--page {
  margin-bottom: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.hero-badge span {
  background: #22c55e;
  width: 8px;
  height: 8px;
  border-radius: 100%;
}

.hero h1 {
  font-size: 2rem;
  max-width: 650px;
  margin-bottom: 8px;
}

.hero p {
  max-width: 650px;
  opacity: 0.95;
  margin-bottom: 16px;
  font-size: 0.97rem;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  background: #fde047;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: #111827;
  display: inline-block;
  box-shadow: 0 8px 20px rgba(15,23,42,0.4);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.7);
  padding: 10px 18px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
}

/* ========= LAYOUT ========= */
.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: flex-start;
}

.layout--single {
  display: block;
}

/* ========= CARDS ========= */
.card {
  background: #ffffff;
  padding: 18px;
  border-radius: 18px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 1.1rem;
}

.section-title span,
.section-title a {
  font-size: 0.82rem;
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

/* ========= POSTS ========= */
.post-list {
  display: grid;
  gap: 12px;
}

.post-item {
  background: #f9fafb;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: background 0.2s, border-color 0.2s, transform 0.1s;
}

.post-item:hover {
  border-color: #f97316;
  background: #fff7ed;
  transform: translateY(-1px);
}

.post-meta {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 2px;
}

.post-item h3 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.post-item h3 a {
  text-decoration: none;
  color: #111827;
}

.post-item h3 a:hover {
  text-decoration: underline;
}

.post-item p {
  font-size: 0.9rem;
}

/* ========= SIDEBAR ========= */
.sidebar-block h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #3730a3;
  font-size: 0.8rem;
  font-weight: 500;
}

.sidebar-small {
  font-size: 0.85rem;
  color: #4b5563;
}

.ad-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #fef9c3;
  border: 1px dashed #a16207;
  font-size: 0.8rem;
}

/* ========= SIMULADOR ========= */
.simulator-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0;
}

input,
textarea {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f9fafb;
  font-size: 0.9rem;
}

textarea {
  min-height: 140px;
}

button {
  margin-top: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #4f46e5;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 6px 15px rgba(79,70,229,0.4);
}

button:hover {
  transform: translateY(-1px);
}

.alert {
  background: #fff7ed;
  padding: 10px;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 0.8rem;
}

/* ========= CONTENIDO DE PÁGINAS ========= */
.page-content {
  max-width: 900px;
  margin: 18px auto;
}

.page-content .post-meta {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.page-content h1 {
  font-size: 1.9rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.page-content h2 {
  font-size: 1.15rem;
  margin: 12px 0 6px;
  color: #0f172a;
}

.page-content p,
.page-content li {
  font-size: 0.96rem;
  color: #4b5563;
}

.page-content ul {
  padding-left: 1.4rem;
  margin-top: 4px;
}

.page-content ul li {
  margin-bottom: 4px;
}

/* ========= IMÁGENES RESPONSIVE (ARTÍCULOS) ========= */
.page-content img {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  margin: 18px auto;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.page-content img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* ========= CAJA DE COMENTARIOS ========= */
.comment-box {
  margin-top: 40px;
  padding: 25px;
  border-radius: 12px;
  background: #f7f7f7;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.comment-box h2 {
  margin-bottom: 18px;
  font-size: 1.5rem;
  color: #222;
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  transition: border-color .25s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #4f46e5;
  outline: none;
}

.btn-comment {
  display: inline-block;
  padding: 12px 20px;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 6px 15px rgba(79,70,229,0.35);
}

.btn-comment:hover {
  background: #3730a3;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79,70,229,0.45);
}

.comment-note {
  margin-top: 12px;
  color: #666;
  font-size: 0.9rem;
}

/* ========= FOOTER ========= */
footer {
  background: #0f172a;
  padding: 20px 0;
  margin-top: 30px;
  color: #cbd5e1;
  font-size: 0.8rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

footer a {
  color: #e5e7eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ========= REDES SOCIALES ========= */
.social-links {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

.social-icon:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.social-icon.instagram {
  background: radial-gradient(circle at 30% 30%, #fdf497, #f72a56, #c7248d, #4f5bd5);
}

.social-icon.facebook {
  background: #1877f2;
}

.social-icon.twitter {
  background: #000000;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: 94%;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .hero {
    padding: 20px 16px 18px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .simulator-group {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 14px;
  }

  .post-item {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .comment-box {
    padding: 18px;
  }

  .page-content h1 {
    font-size: 1.6rem;
  }
}
