/* ==============================
   PÁGINA DE BLOG
   ============================== */

.blog-page {
  padding: 3rem 0;
  min-height: 70vh;
}

.blog-page .content-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin-bottom: 1rem;
}

.blog-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.blog-filters {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.filter-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background-color: transparent;
  color: #10375c;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.filter-link:hover {
  background-color: #f8f9fa;
  border-color: #10375c;
}

.filter-link.active {
  background-color: #10375c;
  color: white;
  border-color: #10375c;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 4rem;
}

/* Changed blog card background to #d9d9d9 in light mode */
.blog-card {
  background: #d9d9d9;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  flex-shrink: 0;
}

.blog-card-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #10375c, #0c2d48);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.blog-card-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #071326;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  color: #071326;
  opacity: 0.7;
}

.blog-card-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: #10375c;
  color: white;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #071326;
  opacity: 0.8;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.blog-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.blog-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.blog-pagination li {
  margin: 0;
}

.blog-pagination a,
.blog-pagination span {
  display: block;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #10375c;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-pagination a:hover {
  background-color: #10375c;
  color: white;
  border-color: #10375c;
}

.blog-pagination .current {
  background-color: #10375c;
  color: white;
  border-color: #10375c;
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

/* ==============================
   ENTRADA INDIVIDUAL DEL BLOG
   ============================== */

.single-post-page {
  padding-bottom: 3rem;
}

.post-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.post-header .breadcrumb {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.post-header .breadcrumb a {
  color: #10375c;
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-header .breadcrumb a:hover {
  color: #0c2d48;
  text-decoration: underline;
}

.post-header .breadcrumb span {
  color: #999;
}

.post-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: #666;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.post-featured-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  margin-bottom: 0;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-title-section {
  padding: 2rem 0 1rem;
  background-color: #ffffff;
}

.post-title-section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #10375c;
  margin: 0;
  line-height: 1.2;
}

.post-content {
  padding: 2rem 0;
}

.post-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.post-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #10375c;
  margin: 2.5rem 0 1.5rem 0;
  border-left: 4px solid #10375c;
  padding-left: 1rem;
}

.post-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #10375c;
  margin: 2rem 0 1rem 0;
}

.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: #555;
}

.post-content blockquote {
  border-left: 4px solid #10375c;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #f8f9fa;
  font-style: italic;
  color: #555;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

.post-tags {
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.post-tags h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #10375c;
  margin-bottom: 1rem;
}

.tags-list {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f8f9fa;
  color: #10375c;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: #10375c;
  color: white;
  border-color: #10375c;
}

.post-navigation {
  padding: 3rem 0;
}

.nav-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.nav-previous,
.nav-next {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.nav-next {
  text-align: right;
}

.nav-label {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nav-title {
  font-size: 1.1rem;
  color: #10375c;
  font-weight: 600;
  line-height: 1.3;
}

.post-cta {
  text-align: center;
  background: linear-gradient(135deg, #10375c 0%, #0c2d48 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 25px rgba(16, 55, 92, 0.3);
  margin-top: 3rem;
}

.post-cta h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.post-cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.post-cta .cta-button {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: white;
  color: #10375c;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.post-cta .cta-button:hover {
  background-color: transparent;
  color: white;
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Modo oscuro */
body.dark-mode .blog-header h1 {
  color: #ffffff;
}

body.dark-mode .blog-header p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .blog-filters {
  background-color: #0a1a2a;
  border-color: #1f2937;
}

body.dark-mode .filter-group label {
  color: #ffffff;
}

body.dark-mode .filter-link {
  background-color: transparent;
  color: #64b5f6;
  border-color: #374151;
}

body.dark-mode .filter-link:hover {
  background-color: #1f2937;
  border-color: #64b5f6;
}

body.dark-mode .filter-link.active {
  background-color: #64b5f6;
  color: #071326;
  border-color: #64b5f6;
}

body.dark-mode .blog-card {
  background-color: #0a1a2a;
  border-color: #1f2937;
}

body.dark-mode .blog-card-image {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.dark-mode .blog-card-image::after {
  background: linear-gradient(to right, #64b5f6, #1976d2);
}

body.dark-mode .blog-card-content h3 {
  color: #ffffff;
}

body.dark-mode .blog-card-meta {
  color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .blog-card-category {
  background-color: #64b5f6;
  color: #071326;
}

body.dark-mode .blog-card-excerpt {
  color: #ffffff;
  opacity: 0.9;
}

body.dark-mode .nav-previous,
body.dark-mode .nav-next {
  background-color: #071326;
  border-color: #374151;
}

body.dark-mode .nav-label {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .nav-title {
  color: #64b5f6;
}

body.dark-mode .post-cta {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

body.dark-mode .post-cta h2 {
  color: #ffffff;
}

body.dark-mode .post-cta p {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .post-cta .cta-button {
  background-color: #64b5f6;
  color: #071326;
  border-color: #64b5f6;
}

body.dark-mode .post-cta .cta-button:hover {
  background-color: transparent;
  color: #64b5f6;
  border-color: #64b5f6;
}

body.dark-mode .post-title-section {
  background-color: #050f1f;
}

body.dark-mode .post-title-section h1 {
  color: #ffffff;
}

body.dark-mode .post-header {
  background: linear-gradient(135deg, #0a1a2a 0%, #1f2937 100%);
  border-bottom-color: #374151;
}

body.dark-mode .post-header .breadcrumb {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .post-header .breadcrumb a {
  color: #64b5f6;
}

body.dark-mode .post-header .breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .post-meta {
  color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .post-content p {
  color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .post-content h2 {
  color: #ffffff;
}

body.dark-mode .post-content h3 {
  color: #ffffff;
}

body.dark-mode .post-content li {
  color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .post-content blockquote {
  background: #1f2937;
  color: rgba(255, 255, 255, 0.9);
  border-left-color: #64b5f6;
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-page .content-container {
    padding: 0 2rem;
  }
}

@media (max-width: 768px) {
  .blog-page {
    padding: 2rem 0;
  }

  .blog-page .content-container {
    padding: 0 1.5rem;
  }

  .blog-header {
    margin-bottom: 2rem;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .blog-filters {
    padding: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .post-header {
    padding: 2rem 0 1.5rem;
  }

  .post-header h1 {
    font-size: 2rem;
  }

  .post-meta {
    gap: 1rem;
  }

  .post-content p {
    font-size: 1rem;
    text-align: left;
  }

  .post-content h2 {
    font-size: 1.5rem;
  }

  .nav-links {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }

  .post-cta {
    padding: 2rem 1rem;
  }

  .post-cta h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-page .content-container {
    padding: 0 1rem;
  }

  .blog-header h1 {
    font-size: 1.75rem;
  }

  .blog-card-content {
    padding: 1rem;
  }

  .blog-filters {
    padding: 1rem;
  }

  .filter-group label {
    font-size: 0.9rem;
  }

  .post-header h1 {
    font-size: 1.75rem;
  }

  .post-content h2 {
    font-size: 1.3rem;
  }

  .post-cta h2 {
    font-size: 1.3rem;
  }

  .cta-button {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
