/* ===========================================
    BLOG Y ARTÍCULO - ESTILOS CONSOLIDADOS
    Archivo CSS que contiene todos los estilos para blog.html y articulo.html
    Compatible con cualquier proyecto web
============================================ */

/* ===========================================
   PRELOADER CON LOGO GIRANDO
   =========================================== */
.projects-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.projects-preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.projects-preloader-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.projects-preloader-logo {
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Ocultar scroll mientras el preloader está activo */
body.projects-preloader-active {
  overflow: hidden;
}

/* Responsive para el preloader */
@media (max-width: 768px) {
  .projects-preloader-logo {
    width: 80px;
    height: 80px;
  }
}

/* ===========================================
    ESTILOS DEL BLOG - LAYOUT DOS COLUMNAS
============================================ */

 /* Tipografía Space Grotesk para todos los elementos h */
 h1, h2, h3, h4, h5, h6 {
    font-family: "Space Grotesk", sans-serif !important;
      }
  /* Tipografía Inter para el resto del texto */
  body, p, span, div, a, li, td, th, label, input, textarea, select, button {
    font-family: "Inter", sans-serif !important;
      }
      @media (max-width: 480px) {
   

   .round-52 {
width: 32px !important;
height: 32px;
}
}
/* Sección del blog */
.blog-section {
    padding: 80px 0;
    background-color: #fafafa;
    min-height: 100vh;
}

/* Contenedor principal */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    
}

/* ===========================================
    COLUMNA PRINCIPAL - ARTÍCULOS
============================================ */
.blog-main {
    background: white;
    padding: 0;
}

/* Artículo individual */
.blog-post {
    margin-bottom: 60px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 40px;
}

.blog-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Imagen del artículo */
.blog-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.blog-post:hover .blog-post-image {
    transform: scale(1.02);
}

/* Meta información */
.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.blog-post-date {
    font-weight: 600;
    color: #333;
}

.blog-post-comments {
    color: #999;
}

/* Título del artículo */
.blog-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-post-title a {
    color: inherit;
	text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: #667eea;
}

/* Extracto */
.blog-post-excerpt {
    color: #f9f9f9;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Botón leer más */
.blog-read-more {
    display: inline-flex;
	 align-items: center;
    background: #cccccc;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 0;
 }

.blog-read-more:hover {
    background: #667eea;
	color: white;
    text-decoration: none;
    transform: translateX(5px);
}

.blog-read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
 }

.blog-read-more:hover i {
    transform: translateX(3px);
 }

/* Paginación */
.blog-pagination {
	display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
 }
 
.pagination-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #f9f9f9;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
   }
 
.pagination-btn.active {
    background: #e0e0e0;
    color: white;
   }
 
.pagination-btn:hover:not(.active) {
    background: #e0e0e0;
 }

/* ===========================================
    SIDEBAR
============================================ */
.blog-sidebar {
    background: white;
    padding: 40px;
    height: fit-content;
    position: sticky;
    top: 100px;
 }

/* Secciones del sidebar */
.sidebar-section {
	margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-section:last-child {
    border-bottom: none;
	margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.2rem;
	font-weight: 700;
    color: #dfdfdf;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Búsqueda */
.search-form {
	position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

.search-btn {
	position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
	border: none;
    color: #999;
	cursor: pointer;
    font-size: 1rem;
}

/* Categorías */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 12px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 0;
}

.category-link:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

.category-link i {
    font-size: 0.8rem;
}

/* Posts populares */
.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.popular-post:hover .popular-post-image {
    transform: scale(1.05);
}

.popular-post-content {
    flex: 1;
}

.popular-post-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
}

.popular-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-title:hover {
    color: #667eea;
    text-decoration: none;
}

/* Tags populares */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #f8f9fa;
    color: #333;
    padding: 8px 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.tag-item:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
 }  

/* ===========================================
    ESTILOS DEL ARTÍCULO
============================================ */

/* Sección del artículo */
.article-section {
    padding: 120px 0 80px;
    background: #fafafa;
    min-height: 100vh;
}

/* Contenedor principal */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 40px;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #666;
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 600;
}

.breadcrumb-item a {
    color: #a3c54c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #764ba2;
}

/* ===========================================
    HEADER DEL ARTÍCULO
============================================ */
.article-header {
    background: white;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Categoría */
.article-category {
    display: inline-block;
    background: #dcff81;
    color: rgb(66, 66, 66);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
	margin-bottom: 20px;
	text-transform: uppercase;
}

/* Título principal */
.article-title {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Meta información */
.article-meta {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta-item i {
	color: #dcff81;
}

/* Imagen destacada */
.article-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.article-featured-image:hover {
    transform: scale(1.02);
}

/* ===========================================
    CONTENIDO DEL ARTÍCULO
============================================ */
.article-content {
    background: white;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 40px 0 20px;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px;
    line-height: 1.4;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

.article-content ul,
.article-content ol {
    margin: 25px 0;
    padding-left: 30px;
}

.article-content li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

/* Cita destacada */
.article-quote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 30px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.2rem;
    color: #333;
	position: relative;
}

.article-quote::before {
    content: '"';
    font-size: 4rem;
    color: #667eea;
	position: absolute;
    top: -10px;
    left: 20px;
    font-family: serif;
}

/* Imagen en el contenido */
.article-image {
	width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin: 30px 0;
    transition: transform 0.3s ease;
}

.article-image:hover {
    transform: scale(1.02);
}

/* ===========================================
    TAGS Y COMPARTIR
============================================ */
.article-footer {
    background: white;
    padding: 40px 60px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 15px;
}

.article-tags-label {
    font-weight: 600;
    color: #333;
}

/* Botones de compartir */
.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.share-label {
    font-weight: 600;
    color: #333;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    color: white;
	cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.whatsapp { background: #25d366; }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===========================================
    ARTÍCULOS RELACIONADOS
============================================ */
.related-articles {
    background: white;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.related-title {
    font-size: 2rem;
	font-weight: 700;
    color: #333;
    margin-bottom: 40px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-card {
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
}

.related-image {
	width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.related-content {
    padding: 20px;
}

.related-date {
    font-size: 0.8rem;
    color: #999;
	margin-bottom: 10px;
}

.related-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
	margin-bottom: 10px;
}

.related-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* ===========================================
    RESPONSIVE - BLOG
============================================ */
@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }
    
    .blog-sidebar {
        position: static;
        order: -1;
}
}

@media (max-width: 768px) {
    .blog-section {
        padding: 60px 0;
}

    .blog-container {
        padding: 0 15px;
}

    .blog-post-image {
        height: 250px;
}

    .blog-post-title {
        font-size: 1.5rem;
    }
    
    .blog-sidebar {
        padding: 30px 20px;
    }
    
    .blog-pagination {
        flex-wrap: wrap;
        gap: 10px;
}

    .pagination-btn {
        width: 45px;
        height: 45px;
}
}

@media (max-width: 480px) {
    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
}

    .popular-post {
        flex-direction: column;
        gap: 10px;
}

    .popular-post-image {
	width: 100%;
        height: 150px;
    }
}

/* ===========================================
    RESPONSIVE - ARTÍCULO
============================================ */
@media (max-width: 1024px) {
    .article-container {
        padding: 0 20px;
}

    .article-header,
    .article-content,
    .article-footer,
    .related-articles {
        padding: 40px;
}
}

@media (max-width: 768px) {
    .article-section {
        padding: 100px 0 60px;
}

    .article-container {
        padding: 0 15px;
}

    .article-header,
    .article-content,
    .article-footer,
    .related-articles {
        padding: 30px 20px;
}

    .article-title {
        font-size: 2.2rem;
}

    .article-featured-image {
        height: 300px;
}

    .article-content h2 {
        font-size: 1.7rem;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
}

    .article-content p {
        font-size: 1rem;
}

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
}

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
}

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

@media (max-width: 480px) {
    .article-title {
        font-size: 1.8rem;
}

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

    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
}
}

/* ===========================================
    UTILIDADES ADICIONALES
============================================ */

/* Clases para animaciones con AOS */
.fade-up {
	opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-up.aos-animate {
	opacity: 1;
    transform: translateY(0);
}

/* Efectos hover mejorados */
.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Transiciones suaves para todos los elementos interactivos */
.blog-read-more,
.article-share .share-btn,
.tag-item,
.category-link,
.popular-post,
.related-card {
    transition: all 0.3s ease;
}

/* Estilos para botones de carga */
.btn-load-more {
    background: #667eea;
    color: white;
    padding: 15px 30px;
	border: none;
    border-radius: 5px;
    font-weight: 600;
	cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Estilos para estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
	content: '';
	position: absolute;
    top: 50%;
	left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
	}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
.sr-only {
		position: absolute;
    width: 1px;
    height: 1px;
		padding: 0;
    margin: -1px;
		overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states para mejor accesibilidad */
.blog-read-more:focus,
.share-btn:focus,
.tag-item:focus,
.category-link:focus,
.search-input:focus,
.pagination-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Estilos para modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .blog-section,
    .article-section {
        background: #ffffff;
	}
	
    .blog-main,
    .blog-sidebar,
    .article-header,
    .article-content,
    .article-footer,
    .related-articles {
        background: #ffffff;
        color: #363636;
	}
	
    .blog-post-title,
    .article-title,
    .sidebar-title,
    .related-title {
        color: #363636;
	}

    .blog-post-excerpt,
    .article-content p,
    .article-content li {
        color: #363636;
}
}
