/* ===== UNIVERSO TECNOLÓGICO / GEOPIXEL — Cloudflare Version ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 20px -4px rgba(0,0,0,0.08);
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img { max-height: 48px; width: auto; }
.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
}
.brand-text span { color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  max-width: 280px;
}
.search-form input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px 0 0 8px;
  border-right: none;
  background: #f8fafc;
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}
.search-form input:focus {
  border-color: var(--primary);
  background: #fff;
}
.search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.search-form button:hover { background: var(--primary-dark); }

.btn-login {
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-login:hover { border-color: var(--primary); color: var(--primary); }

.menu-toggle {
  display: none;
  background: #f8fafc;
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
}

/* ===== NAV ===== */
.main-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-inner a {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569;
  border-bottom: 2.5px solid transparent;
}
.nav-inner a:hover,
.nav-inner a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #f8fafc;
}

.mobile-menu {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a {
  display: block;
  padding: 14px 24px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}
.mobile-menu.active { display: block; }

/* ===== MAIN ===== */
main { flex: 1; }

/* ===== FEATURED ===== */
.featured-section { padding: 32px 0 16px; }
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  transition: 0.25s;
}
.featured-card:hover { box-shadow: var(--shadow); }
.featured-image {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  min-height: 280px;
}
.featured-content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.featured-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: #0f172a;
}
.featured-title a { color: #0f172a; }
.featured-title a:hover { color: var(--primary); }
.featured-excerpt {
  color: var(--text-muted);
  font-size: 0.97rem;
  margin-bottom: 20px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff !important;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  width: fit-content;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }

/* ===== SECTIONS ===== */
.section { padding: 28px 0; }
.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: 0.25s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.post-card .thumb {
  height: 160px;
  background: #e2e8f0;
}
.post-card .body { padding: 18px; }
.post-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}
.post-card h3 a { color: #0f172a; }
.post-card h3 a:hover { color: var(--primary); }
.post-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post-meta {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ===== CATEGORY CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: 0.25s;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.cat-icon {
  width: 52px;
  height: 52px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.cat-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.cat-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ===== ARTICLE PAGE (clean) ===== */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}
.article-page .badge { margin-bottom: 16px; }
.article-page h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: #0f172a;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-cover {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  background: #e2e8f0;
  min-height: 320px;
}
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
}
.article-body p { margin-bottom: 1.2em; }
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 1.8em 0 0.6em;
  color: #0f172a;
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 1.4em 0 0.5em;
}
.related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.related h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
}

/* ===== SECTION HERO ===== */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 0 32px;
  text-align: center;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
.footer-about h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-about p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 280px;
}
.footer-brand-note {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 8px;
}
.social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  transition: 0.2s;
}
.social-icons a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.social-icons svg { width: 18px; height: 18px; fill: currentColor; }

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  color: #0f172a;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid #f1f5f9;
  padding-top: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ===== NEWSLETTER ===== */
.newsletter-box {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 14px;
  padding: 28px;
  color: #fff;
  margin: 24px 0;
}
.newsletter-box h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  border: none;
  color: #fff;
}
.newsletter-box p {
  font-size: 0.92rem;
  opacity: 0.95;
  margin-bottom: 16px;
}
.newsletter-box form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.newsletter-box input {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
}
.newsletter-box button {
  padding: 12px 20px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== FORMS (Contact etc) ===== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .featured-card { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .search-form { max-width: 180px; }
}

@media (max-width: 600px) {
  .posts-grid,
  .cards-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .search-form { order: 3; max-width: 100%; width: 100%; }
  .article-page h1 { font-size: 1.55rem; }
  .featured-content { padding: 24px 20px; }
  .page-hero h1 { font-size: 1.6rem; }
}
