/* ==========================================================================
   RANC INTERNACIONAL - BLOG STYLESHEET (Brand Color Matched)
   ========================================================================== */

:root {
  --brand-navy: #002855;
  --brand-orange: #e68a00;
  --brand-orange-hover: #cc7a00;
  --brand-gray: #64748b;

  --bg-dark: #0b192c;
  --bg-dark-surface: #1e293b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;

  --text-primary-dark: #f8fafc;
  --text-secondary-dark: #94a3b8;
  --text-primary-light: #002855;
  --text-secondary-light: #475569;

  --accent: var(--brand-orange);
  --accent-glow: rgba(230, 138, 0, 0.25);
  --accent-hover: var(--brand-orange-hover);

  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: rgba(0, 40, 85, 0.08);

  --font-heading: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace, sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 40, 85, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(0, 40, 85, 0.1);
  --shadow-glow: 0 0 35px -5px var(--accent-glow);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER EN CRISTAL CLARO */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 40, 85, 0.08);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-navy);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-orange);
}

.btn-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-glow);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--brand-navy);
  font-size: 1.5rem;
  cursor: pointer;
}

.wrapper {
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 50px;
  background: rgba(230, 138, 0, 0.12);
  border: 1px solid rgba(230, 138, 0, 0.3);
  color: var(--brand-orange);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--brand-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand-orange);
}

/* HERO BLOG */
.hero-blog {
  background: var(--bg-dark);
}

.hero-title {
  font-size: clamp(2.5rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary-dark);
  max-width: 750px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 1.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary-dark);
  padding: 0.7rem 1.3rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
  box-shadow: var(--shadow-glow);
}

/* FEATURED CARD */
.featured-section {
  background: var(--bg-dark);
}

.featured-card {
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.featured-card:hover {
  border-color: rgba(230, 138, 0, 0.4);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.featured-image-container {
  position: relative;
  height: 100%;
  min-height: 380px;
}

.featured-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--brand-orange);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.featured-content {
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--brand-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.meta-dot {
  color: var(--text-secondary-dark);
  margin: 0 0.4rem;
}

.featured-title {
  font-size: 2rem;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.featured-excerpt {
  color: var(--text-secondary-dark);
  font-size: 0.98rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.author-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-dark);
  padding-top: 1.5rem;
}

.author-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.author-date {
  color: var(--text-secondary-dark);
  font-size: 0.8rem;
}

.read-more-link {
  color: var(--brand-orange);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}

.read-more-link:hover {
  color: var(--brand-orange-hover);
}

/* REJILLA CLARA */
.light-section {
  background: var(--bg-light);
  color: var(--text-primary-light);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -10px rgba(0, 40, 85, 0.12);
  border-color: rgba(230, 138, 0, 0.4);
}

.card-media {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-card:hover .card-media img {
  transform: scale(1.04);
}

.category-pill {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(11, 25, 44, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.card-body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  font-size: 1.25rem;
  color: var(--brand-navy);
  margin: 0.6rem 0;
  line-height: 1.3;
}

.card-body p {
  color: var(--text-secondary-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-card.is-hidden,
.featured-card.is-hidden {
  display: none !important;
}

.dark-section {
  background: var(--bg-dark-surface);
  border-top: 1px solid var(--border-dark);
}

.newsletter-card {
  background: linear-gradient(135deg, #1e293b 0%, #0b192c 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary-dark);
  font-size: 0.85rem;
}

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .featured-image-container {
    height: 260px;
    min-height: auto;
  }
  .newsletter-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 2rem;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }
  .nav-links.is-open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
}
