/*--------------------------------------------------------------
# Blog Styles - 7 Torres
--------------------------------------------------------------*/

/* ===== BLOG SECTION STYLES ===== */

.blog.section {
  padding: 80px 0;
  background-color: #f8f9fa;
}

/* ===== SCROLL FIXES ===== */

html, body {
  scroll-behavior: smooth !important;
  overflow-x: hidden !important;
}

body.blog-post {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh !important;
}

.main {
  overflow: visible !important;
  height: auto !important;
}

/* ===== PAGE TITLE SECTION ===== */

.page-title {
  overflow: visible !important;
  height: auto !important;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(45deg, var(--accent-color), #209475);
  border-radius: 3px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== DISABLED LINKS STYLES ===== */

/* Estilos para enlaces desactivados */
.text-muted[style*="cursor: not-allowed"],
span.read-more.text-muted[style*="cursor: not-allowed"] {
  color: #adb5bd !important;
  text-decoration: none;
  pointer-events: none;
  opacity: 0.6;
}

.text-muted[style*="cursor: not-allowed"]:hover {
  color: #adb5bd !important;
  text-decoration: none;
}

/* Overlay para artículos próximamente */
.blog-post:has(.text-muted[style*="cursor: not-allowed"]) {
  position: relative;
}

.blog-post:has(.text-muted[style*="cursor: not-allowed"])::before {
  content: 'PRÓXIMAMENTE';
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(108, 117, 125, 0.9);
  color: white;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  z-index: 2;
}

/* ===== BLOG POST FEATURED ===== */

.blog-post-featured {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.blog-post-featured:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.blog-post-featured .post-img {
  position: relative;
  overflow: hidden;
  height: 300px;
}

.blog-post-featured .post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post-featured:hover .post-img img {
  transform: scale(1.05);
}

.post-category-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(45deg, var(--accent-color), #209475);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-post-featured .post-content {
  padding: 30px;
}

/* ===== BLOG POST GRID ===== */

.blog-post {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-post:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.blog-post .post-img {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.blog-post .post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-post:hover .post-img img {
  transform: scale(1.03);
}

.blog-post .post-category {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent-color);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.blog-post .post-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== POST META ===== */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #6c757d;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-meta i {
  color: var(--accent-color);
}

.post-reading-time {
  margin-left: auto;
}

/* ===== POST TITLES ===== */

.post-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
}

.blog-post .post-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.post-title a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--accent-color);
}

/* ===== POST CONTENT ===== */

.post-excerpt {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.read-more {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  margin-top: auto;
}

.read-more:hover {
  color: #1a7a5e;
  transform: translateX(3px);
}

.read-more i {
  transition: transform 0.3s ease;
}

.read-more:hover i {
  transform: translateX(3px);
}

/* ===== BLOG WIDGETS ===== */

.blog-widget {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.widget-title {
  background: linear-gradient(135deg, var(--accent-color), #209475);
  color: white;
  padding: 20px;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.widget-content {
  padding: 25px;
}

/* ===== CATEGORY LIST ===== */

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  border-bottom: 1px solid #eee;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list li:hover {
  background-color: #f8f9fa;
  margin: 0 -25px;
  padding-left: 25px;
  padding-right: 25px;
}

.category-list a {
  color: var(--heading-color);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.category-list a:hover {
  color: var(--accent-color);
}

.category-list i {
  margin-right: 10px;
  color: var(--accent-color);
  width: 16px;
}

.category-list span {
  background: #e9ecef;
  color: #6c757d;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
}

/* ===== RECENT POSTS ===== */

.recent-post {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

.recent-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.recent-post:hover {
  background-color: #f8f9fa;
  margin: 0 -25px;
  padding-left: 25px;
  padding-right: 25px;
}

.recent-post-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.recent-post-content h6 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.recent-post-content h6 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.recent-post-content h6 a:hover {
  color: var(--accent-color);
}

.recent-post-date {
  color: #6c757d;
  font-size: 0.8rem;
}

/* ===== CTA WIDGET ===== */

.cta-widget {
  background: linear-gradient(135deg, var(--accent-color), #209475);
  color: white;
}

.cta-widget .widget-title {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.cta-widget .widget-content {
  text-align: center;
}

.cta-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.cta-widget h4 {
  color: white;
  margin-bottom: 15px;
}

.cta-widget p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 25px;
}

.cta-widget .btn {
  background: white;
  color: var(--accent-color);
  border: none;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.cta-widget .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  background: #f8f9fa;
}

/* ===== PAGINATION ===== */

.pagination {
  margin-top: 50px;
}

.page-link {
  color: var(--accent-color);
  border: 1px solid #dee2e6;
  padding: 12px 18px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.page-link:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

.page-item.active .page-link {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

/* ===== BLOG POST CONTENT PAGE ===== */

.blog-post.section {
  padding: 40px 0 80px 0;
  background-color: white;
}

.blog-post-content {
  background: white;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

/* ===== TABLE OF CONTENTS ===== */

.table-of-contents {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid var(--accent-color);
}

.table-of-contents h3 {
  color: var(--heading-color);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.table-of-contents ol {
  margin: 0;
  padding-left: 20px;
}

.table-of-contents li {
  margin-bottom: 8px;
}

.table-of-contents a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.table-of-contents a:hover {
  color: var(--accent-color);
}

/* ===== CONTENT STYLING ===== */

.post-content h2 {
  color: var(--heading-color);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 40px 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

.post-content h3 {
  color: var(--heading-color);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 30px 0 15px 0;
}

.post-content h4 {
  color: var(--heading-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 25px 0 12px 0;
}

.post-content p {
  line-height: 1.7;
  margin-bottom: 20px;
  color: #333;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.post-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===== HIGHLIGHT BOXES ===== */

.highlight-box {
  border-radius: 10px;
  border-left: 5px solid rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100px;
  background: rgba(255, 255, 255, 0.1);
  transform: skewX(-15deg);
  transform-origin: top;
}

.highlight-box h4 {
  margin-bottom: 15px;
  font-weight: 600;
}

.info-box {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 10px;
  border-left: 5px solid rgba(255, 255, 255, 0.3);
}

/* ===== TESTIMONIAL BOX ===== */

.testimonial-box {
  border-left: 5px solid var(--accent-color);
  position: relative;
}

.testimonial-box::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.3;
  font-family: serif;
}

.blockquote {
  font-style: italic;
  margin-bottom: 15px;
}

.blockquote-footer {
  font-size: 0.9rem;
  color: #6c757d;
}

/* ===== CTA SECTION ===== */

.cta-section {
  background: linear-gradient(135deg, var(--accent-color), #209475);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
}

.cta-section * {
  position: relative;
  z-index: 1;
}

.cta-buttons .btn {
  padding: 15px 30px;
  font-weight: 600;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===== RELATED ARTICLES ===== */

.related-articles h3 {
  color: var(--heading-color);
  margin-bottom: 30px;
  font-size: 1.5rem;
  font-weight: 700;
}

.related-article {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  transition: all 0.3s ease;
  height: 100%;
}

.related-article:hover {
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.related-article img {
  margin-bottom: 15px;
  border-radius: 8px;
  height: 120px;
  object-fit: cover;
}

.related-article h5 {
  font-size: 1rem;
  line-height: 1.3;
}

.related-article h5 a {
  color: var(--heading-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-article h5 a:hover {
  color: var(--accent-color);
}

/* ===== SIDEBAR WIDGETS ===== */

.author-info {
  text-align: center;
  border: 1px solid #e9ecef;
}

.author-info img {
  border: 3px solid var(--accent-color);
}

.quick-contact {
  background: linear-gradient(135deg, var(--accent-color), #209475);
}

.contact-options .btn {
  transition: all 0.3s ease;
}

.contact-options .btn:hover {
  transform: translateY(-2px);
}

.social-share .share-buttons .btn {
  transition: all 0.3s ease;
}

.social-share .share-buttons .btn:hover {
  transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 992px) {
  .blog-post-featured .post-img {
    height: 250px;
  }
  
  .blog-post .post-img {
    height: 200px;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .blog-post-content {
    padding: 30px 25px;
  }
  
  .post-content h2 {
    font-size: 1.6rem;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .blog.section {
    padding: 60px 0;
  }
  
  .blog-post-featured .post-img {
    height: 220px;
  }
  
  .blog-post .post-img {
    height: 180px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .blog-post-content {
    padding: 25px 20px;
  }
  
  .widget-content {
    padding: 20px;
  }
  
  .post-meta {
    gap: 10px;
    font-size: 0.85rem;
  }
  
  .post-reading-time {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
  }
  
  .table-of-contents {
    padding: 20px;
  }
  
  .cta-buttons .btn {
    display: block;
    margin-bottom: 10px;
    width: 100%;
  }
  
  .post-content h2 {
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
  }
  
  .post-content h3 {
    font-size: 1.3rem;
  }
}

/* Mobile Portrait */
@media (max-width: 576px) {
  .blog.section {
    padding: 50px 0;
  }
  
  .blog-post-featured {
    margin-bottom: 1.5rem;
  }
  
  .blog-post-featured .post-img {
    height: 200px;
  }
  
  .blog-post .post-img {
    height: 160px;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .blog-post-content {
    padding: 20px 15px;
  }
  
  .blog-post-featured .post-content {
    padding: 20px;
  }
  
  .blog-post .post-content {
    padding: 20px;
  }
  
  .widget-content {
    padding: 15px;
  }
  
  .widget-title {
    padding: 15px;
    font-size: 1rem;
  }
  
  .post-title {
    font-size: 1.2rem;
  }
  
  .blog-post .post-title {
    font-size: 1.1rem;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .recent-post {
    flex-direction: column;
    text-align: center;
  }
  
  .recent-post-img {
    width: 100%;
    height: 120px;
    margin: 0 auto 10px auto;
  }
  
  .category-list li:hover {
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .recent-post:hover {
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .table-of-contents {
    padding: 15px;
  }
  
  .table-of-contents ol {
    padding-left: 15px;
  }
  
  .highlight-box,
  .info-box,
  .testimonial-box {
    padding: 20px 15px;
  }
  
  .cta-section {
    padding: 30px 20px;
  }
  
  .related-article {
    margin-bottom: 20px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .section-title {
    font-size: 1.6rem;
  }
  
  .post-title {
    font-size: 1.1rem;
  }
  
  .blog-post .post-title {
    font-size: 1rem;
  }
  
  .blog-post-content {
    padding: 15px 10px;
  }
  
  .widget-content {
    padding: 12px;
  }
  
  .post-content h2 {
    font-size: 1.3rem;
  }
  
  .post-content h3 {
    font-size: 1.2rem;
  }
  
  .post-content h4 {
    font-size: 1.1rem;
  }
}

/* ===== PRINT STYLES ===== */

@media print {
  .blog-widget,
  .cta-section,
  .social-share,
  .related-articles {
    display: none;
  }
  
  .blog-post-content {
    box-shadow: none;
    padding: 20px 0;
  }
  
  .post-img {
    page-break-inside: avoid;
  }
  
  .post-content h2 {
    page-break-after: avoid;
  }
}
