:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --color-bg: #ffffff;
  --color-surface: #f5f5f7;
  --color-border: #d2d2d7;
  --color-text: #1d1d1f;
  --color-text-secondary: #6e6e73;
  --color-accent: #0071e3;
  --radius-card: 18px;
  --shadow-card: 0 2px 20px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 8px 40px rgba(0,0,0,0.12);
  --nav-height: 52px;
  --max-width: 1200px;
}

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

html { scroll-behavior: smooth; }

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

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(210,210,215,0.6);
  height: var(--nav-height);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.4px;
  flex-shrink: 0;
}

.nav-logo span { color: var(--color-accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.nav-links a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* HERO */
.hero {
  background: var(--color-surface);
  padding: 88px 24px 80px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.03;
  color: var(--color-text);
  margin-bottom: 20px;
}

.hero p {
  font-size: 19px;
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 400;
}

/* CONTAINER */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* EMPTY SECTION */
.empty-section {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  padding: 80px 24px 96px;
}

.empty-section-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  color: var(--color-text-secondary);
  opacity: 0.65;
}

.empty-section h2 {
  font-size: 28px;
  margin: 0 0 12px;
}

.empty-section p {
  color: var(--color-text-secondary);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.empty-section-link {
  display: inline-block;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.empty-section-link:hover {
  text-decoration: underline;
}

/* POSTS GRID */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 32px 0 64px;
}

/* POST CARD */
.post-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.post-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.post-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1d1d1f 0%, #424245 100%);
}

.placeholder-decoration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.placeholder-watermark {
  position: relative;
  z-index: 1;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: rgba(255, 255, 255, 0.95);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

.placeholder-watermark-more {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 800;
}

.placeholder-noticias  { background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%); }
.placeholder-reviews   { background: linear-gradient(135deg, #FF9500 0%, #FF3B30 100%); }
.placeholder-productos { background: linear-gradient(135deg, #AF52DE 0%, #FF2D55 100%); }
.placeholder-historia  { background: linear-gradient(135deg, #8E8E93 0%, #1d1d1f 100%); }
.placeholder-ecosistema{ background: linear-gradient(135deg, #34C759 0%, #00C7BE 100%); }

.post-card-body {
  padding: 22px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card-category {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.post-card-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: var(--color-text);
}

.post-card-excerpt {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-size: 13px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.post-card-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

/* FEATURED CARD */
.post-card.featured {
  grid-column: 1 / -1;
}

.post-card.featured .post-card-image-placeholder {
  aspect-ratio: 21/9;
}

.post-card.featured .placeholder-watermark {
  font-size: 64px;
  letter-spacing: -2px;
}

.post-card.featured .post-card-title {
  font-size: 26px;
  letter-spacing: -0.5px;
}

.post-card.featured .post-card-excerpt {
  font-size: 16px;
  -webkit-line-clamp: 2;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 0 64px;
}

.pagination a,
.pagination span {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  transition: background 0.2s, color 0.2s;
  border: 1px solid var(--color-border);
}

.pagination a:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.pagination .current {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* LIST PAGE HEADER */
.list-header {
  background: var(--color-surface);
  padding: 64px 24px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.list-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--color-text);
  margin-bottom: 8px;
  text-transform: capitalize;
}

.list-header p {
  font-size: 17px;
  color: var(--color-text-secondary);
}

/* SINGLE POST */
.post-header {
  padding: 64px 24px 48px;
  max-width: 760px;
  margin: 0 auto;
}

.post-header .post-category {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.post-header h1 {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.07;
  color: var(--color-text);
  margin-bottom: 20px;
}

.post-header .post-description {
  font-size: 20px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
  font-weight: 400;
}

.post-header .post-meta {
  font-size: 14px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.post-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
}

.post-featured-image {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.post-featured-image img {
  width: 100%;
  border-radius: var(--radius-card);
  display: block;
}

/* POST CONTENT */
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 64px;
  font-size: 18px;
  line-height: 1.78;
  color: var(--color-text);
}

.post-content h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 52px 0 16px;
  line-height: 1.15;
}

.post-content h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 36px 0 12px;
}

.post-content p { margin-bottom: 24px; }

.post-content a {
  color: var(--color-accent);
  text-decoration: none;
}

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

.post-content img {
  width: 100%;
  border-radius: 12px;
  margin: 28px 0;
  display: block;
}

.post-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.post-content code {
  background: var(--color-surface);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.875em;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
}

.post-content pre {
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 24px;
  border-radius: 14px;
  overflow-x: auto;
  margin: 28px 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 14px;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.post-content li { margin-bottom: 8px; }

.post-content hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}

/* TAGS */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.post-tag {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all 0.2s;
}

.post-tag:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* POST NAV */
.post-nav {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
}

.post-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  max-width: 45%;
  line-height: 1.4;
}

.post-nav a:hover { text-decoration: underline; }
.post-nav .post-nav-next { text-align: right; margin-left: auto; }

/* FOOTER */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 48px 24px 40px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.footer-parent {
  font-size: 13px;
  color: var(--color-text-secondary);
  letter-spacing: 0.2px;
  margin-top: 4px;
}

.footer-parent a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.footer-parent a:hover { opacity: 0.75; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.7;
  margin-top: 4px;
}

/* ERROR PAGE */
.error-page {
  min-height: calc(100vh - var(--nav-height) - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-code {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 700;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--color-border);
  margin-bottom: 24px;
}

.error-page h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.error-page p {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

.error-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.error-btn:hover { opacity: 0.85; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(210,210,215,0.6);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    opacity: 1;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child a { border-bottom: 0; }
}

@media (max-width: 600px) {
  .hero { padding: 56px 20px 48px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured .post-card-image-placeholder { aspect-ratio: 16/9; }
  .post-content { font-size: 17px; }
  .post-header { padding: 40px 20px 32px; }
}
