@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;800&display=swap');

:root {
  /* Color Palette - Deep Premium Slates */
  --bg-dark: #020617;
  --bg-card: rgba(30, 41, 59, 0.5);
  --accent-primary: #8b5cf6;
  --accent-secondary: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  /* Glassmorphism Tokens */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);

  /* Layout & Spacing */
  --container-max: 1200px;
  --section-padding: 8rem 2rem;

  /* Transitions */
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: pulse 15s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/salvador.jpg') no-repeat right center fixed;
  background-size: cover;
  opacity: 0.1;
  z-index: -2;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* --- Utility Classes --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent-gradient);
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
  transition: var(--transition-slow);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition-fast);
}

.site-header.scrolled {
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Media Support styles */
.audio-player-wrap audio {
  filter: invert(1) hue-rotate(180deg) brightness(1.5);
  opacity: 0.8;
}

.video-container iframe {
  box-shadow: var(--premium-shadow);
  border: 1px solid var(--glass-border);
}

/* Animations Overrides */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.06);
}

.social-icon {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: var(--transition-slow);
}

.social-icon:hover {
  color: var(--text-main);
  transform: translateY(-3px);
  text-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 0;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    border-left: 1px solid var(--glass-border);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li a {
    font-size: 1.5rem;
    font-weight: 600;
  }
}

/* --- Core Sections --- */
#app {
  min-height: 100vh;
}

.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* --- Carousel Styles --- */
.hero-carousel {
  margin: 2rem auto 0;
  width: 100%;
  max-width: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--glass-border);
}

.carousel-track-container {
  height: 100%;
  width: 100%;
  position: relative;
}

.carousel-track {
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-slide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(139, 92, 246, 0.4);
  border-color: var(--accent-primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 1.5rem;
}

.carousel-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.current-slide {
  background: var(--accent-primary);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--accent-primary);
  border-color: transparent;
}

@media (max-width: 768px) {
  .hero-carousel {
    aspect-ratio: 4 / 3;
    margin-top: 2rem;
  }
}

/* --- Modal Styles --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  padding: 3rem;
  position: relative;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  color: var(--text-main);
  transform: rotate(90deg);
}

.modal-content {
  color: var(--text-main);
  line-height: 1.8;
}

.modal-content h2 {
  margin-bottom: 2rem;
  font-size: 2.5rem;
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 1.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-small:hover {
  background: var(--accent-gradient);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

/* Custom Scrollbar for Modal */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 10px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Sub-page Styles --- */
.sub-page-container {
  padding: 8rem 0;
  min-height: 100vh;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 3rem;
  transition: var(--transition-fast);
  cursor: pointer;
  border: 1px solid var(--glass-border);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
  transform: translateX(-5px);
}

.research-card-clickable {
  cursor: pointer;
  transition: var(--transition-normal);
}

.research-card-clickable:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.sub-page-header {
  text-align: center;
  margin-bottom: 5rem;
}

.sub-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.page-transition {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: fadeInUp 1s forwards;
}

/* --- NEW: HORIZONTAL WORK DIARY --- */
.horizontal-timeline-container {
  position: relative;
  width: 100%;
  padding: 6rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  align-items: center;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) transparent;
  scroll-behavior: smooth;
  gap: 2rem;
}

.horizontal-timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  min-width: 1500px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-primary), transparent);
  opacity: 0.3;
  z-index: 1;
}

.timeline-horizontal-item {
  position: relative;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 2rem;
}

.timeline-horizontal-item:hover {
  transform: translateY(-15px);
}

.timeline-icon-wrap {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-horizontal-item:hover .timeline-icon-wrap {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px rgba(255, 184, 76, 0.3);
  background: rgba(255, 184, 76, 0.1);
  transform: scale(1.1);
}

.timeline-h-date {
  font-size: 0.9rem;
  color: var(--accent-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.timeline-h-title {
  font-size: 1rem;
  color: var(--text-main);
  text-align: center;
  max-width: 200px;
  line-height: 1.4;
  opacity: 0.8;
}

/* Diary Modal */
.diary-modal-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.timeline-tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(255, 184, 76, 0.1);
  color: var(--accent-primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 184, 76, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Online Classes Section Refinements */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.class-card {
  padding: 3rem;
  text-align: center;
  transition: all 0.4s ease;
}

.class-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  background: rgba(255, 184, 76, 0.05);
}

.class-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: #25D366;
  color: white;
  padding: 1.2rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.2);
}

.cta-whatsapp:hover {
  background: #128C7E;
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
}

/* --- Bio Modal Enrichment: Fluid Text Layout --- */
.bio-modal-scroll {
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.bio-block {
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--glass-border);
}

.bio-block:last-child {
  border-bottom: none;
}

.bio-block-title {
  font-size: 1.8rem;
  margin-bottom: 2.5rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bio-block-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
  max-width: 900px;
}

/* New Fluid Entry Styles */
.bio-entry {
  margin-bottom: 2.5rem;
}

.bio-entry:last-child {
  margin-bottom: 0;
}

.bio-entry-label {
  display: block;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bio-entry-text {
  display: block;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.bio-entry-text strong {
  color: var(--text-main);
}

/* Quote Section Styles */
.bio-quotes-container {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 1rem;
}

.quote-item {
  position: relative;
  padding: 2rem 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  font-style: italic;
  line-height: 1.8;
  color: var(--text-muted);
}

.quote-item::before {
  content: '"';
  position: absolute;
  top: -5px;
  left: 15px;
  font-size: 4rem;
  color: var(--accent-primary);
  font-family: serif;
  opacity: 0.2;
}

@media (max-width: 768px) {
  .bio-block-title {
    font-size: 1.5rem;
  }

  .bio-block-content {
    font-size: 1.05rem;
  }
}



@media (max-width: 900px) {
  .diary-modal-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ================================================
   BLOG STYLES
   ================================================ */

/* Grid de tarjetas */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 1rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-slow);
  overflow: hidden;
  border-radius: 24px;
}

.blog-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-soft);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-img-wrap {
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.blog-card-img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}


.blog-card-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-category-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  width: fit-content;
}

.blog-card-title {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--accent-primary);
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.5rem;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.blog-card-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.7;
}

.blog-card-read-more {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition-fast);
}

.blog-card:hover .blog-card-read-more {
  gap: 0.8rem;
}

/* ---- Vista de artículo individual ---- */
.blog-post-hero {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 24px;
  margin-bottom: 3rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: block;
}

.blog-post-hero-placeholder {
  width: 100%;
  height: 320px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 3rem;
}

/* Sharing Buttons */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--premium-shadow);
}

.share-btn.fb {
  color: #1877F2;
  border-color: rgba(24, 119, 242, 0.3);
}

.share-btn.wa {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.3);
}

.share-btn.native {
  color: var(--accent-primary);
  border-color: rgba(139, 92, 246, 0.3);
}

.share-btn.copy {
  color: var(--text-muted);
}

.share-btn svg {
  flex-shrink: 0;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.blog-post-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.blog-post-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.blog-post-body {
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.9;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* For images inside the post body content */
.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: block;
}

.blog-post-body p {
  margin-bottom: 1.8rem;
}

.blog-post-body h3 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.blog-post-body strong {
  color: var(--text-main);
  font-weight: 700;
}

.blog-post-body em {
  color: var(--accent-primary);
  font-style: italic;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-main);
}

/* ---- Featured post (primer artículo grande) ---- */
.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
  padding: 2.5rem;
  cursor: pointer;
  transition: var(--transition-slow);
  border-radius: 24px;
}

.blog-featured:hover {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.04);
  transform: translateY(-5px);
}

.blog-featured-img-wrap {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-featured:hover .blog-featured-img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .blog-featured {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-post-body {
    font-size: 1rem;
  }
}

/* --- Added Blog Management Styles --- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 0.5rem;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  backdrop-filter: blur(8px);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.load-more-container {
  text-align: center;
  margin-top: 5rem;
  padding-bottom: 2rem;
}