/* 
* The Tower School - Estilos para la página de Blog
*/

/* Page Banner */
.page-banner {
  background: linear-gradient(rgba(93, 93, 93, 0.8), rgba(93, 93, 93, 0.8)), url('../images/blog-banner.jpg');
  background-size: cover;
  background-position: center;
  color: var(--light-text);
  text-align: center;
  padding: 80px 0;
}

.page-banner h1 {
  color: var(--light-text);
  margin-bottom: 10px;
}

/* Blog Content */
.blog-content {
  padding: 80px 0;
  background-color: var(--light-text);
}

.blog-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

/* Blog Main */
.blog-main {
  margin-bottom: 40px;
}

/* Featured Post */
.blog-post.featured {
  margin-bottom: 50px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: var(--light-bg);
}

.blog-post.featured .post-image {
  height: 400px;
}

.blog-post.featured .post-content {
  padding: 30px;
}

.blog-post.featured .post-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.blog-post.featured .post-excerpt {
  margin-bottom: 20px;
}

/* Regular Posts */
.regular-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-post {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  background-color: var(--light-bg);
  transition: transform 0.3s ease;
}

.blog-post:hover {
  transform: translateY(-10px);
}

.post-image {
  height: 200px;
  overflow: hidden;
}

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

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

.post-content {
  padding: 20px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.post-category {
  color: var(--primary-color);
  font-weight: 500;
}

.post-date {
  color: var(--text-color-light);
}

.post-title {
  margin-bottom: 10px;
  font-size: 1.3rem;
  line-height: 1.4;
}

.post-excerpt {
  margin-bottom: 15px;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pagination */
.pagination {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-number, .page-dots, .page-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 5px;
  border-radius: 50%;
  font-weight: 500;
  transition: all 0.3s ease;
}

.page-number {
  background-color: var(--light-bg);
  color: var(--text-color);
}

.page-number.active {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.page-number:hover:not(.active) {
  background-color: var(--border-color);
}

.page-next {
  width: auto;
  padding: 0 15px;
  border-radius: 20px;
  background-color: var(--light-bg);
}

.page-next i {
  margin-right: 5px;
}

.page-next:hover {
  background-color: var(--border-color);
}

/* Blog Sidebar */
.blog-sidebar {
  align-self: start;
}

.sidebar-widget {
  margin-bottom: 40px;
  padding: 25px;
  border-radius: 8px;
  background-color: var(--light-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.widget-title {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
  font-size: 1.3rem;
}

/* Search Widget */
.search-form {
  display: flex;
  position: relative;
}

.search-form input {
  width: 100%;
  padding: 12px;
  padding-right: 50px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
}

.search-form button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50px;
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

/* Categories Widget */
.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.category-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.category-list a:hover {
  color: var(--primary-color);
}

.category-list span {
  color: var(--text-color-light);
}

/* Popular Posts Widget */
.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.popular-post {
  display: flex;
  align-items: center;
}

.popular-post .post-image {
  width: 80px;
  height: 80px;
  margin-right: 15px;
  flex-shrink: 0;
}

.popular-post .post-info h4 {
  margin-bottom: 5px;
  font-size: 1rem;
  line-height: 1.4;
}

.popular-post .post-info h4 a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

.popular-post .post-info h4 a:hover {
  color: var(--primary-color);
}

.popular-post .post-date {
  font-size: 0.8rem;
}

/* Tags Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  background-color: var(--border-color);
  color: var(--text-color);
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
}

/* Newsletter Widget */
.newsletter-widget p {
  margin-bottom: 15px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-form input {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Poppins', sans-serif;
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(rgba(93, 93, 93, 0.9), rgba(93, 93, 93, 0.9)), url('../images/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--light-text);
  text-align: center;
}

.cta-section h2 {
  color: var(--light-text);
  margin-bottom: 20px;
}

.cta-section p {
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-sidebar {
    margin-top: 40px;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .page-banner {
    padding: 60px 0;
  }
  
  .blog-post.featured .post-image {
    height: 250px;
  }
  
  .regular-posts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .post-meta {
    flex-direction: column;
    gap: 5px;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
}
