/* Spai Custom Styles */

/* ==========================================================================
   Full Width Layout Override
   ========================================================================== */

/* Override Minimal Mistakes theme's content width constraints */
.page {
  width: 100%;
  max-width: 100%;
}

.page__inner-wrap {
  max-width: 100%;
  padding: 0 1.5em;
}

@media (min-width: 80em) {
  .page__inner-wrap {
    padding: 0 3em;
  }
}

/* Force full-width layout - remove sidebar completely */
.layout--home .sidebar {
  display: none !important;
}

.layout--home .page {
  width: 100% !important;
  float: none !important;
}

.layout--home .archive {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

/* Remove any left margins/padding that create empty space */
@media (min-width: 64em) {
  .page {
    width: 100% !important;
    padding-right: 0 !important;
  }

  .page__content {
    width: 100% !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
}

/* Center content with reasonable max-width for readability */
.intro-section,
.featured-section,
.filter-section,
.articles-grid,
.pagination {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* ==========================================================================
   Site Title with Spanish Flag
   ========================================================================== */

.site-title::before {
  content: "🇪🇸 ";
  font-size: 1.2em;
  margin-right: 0.3em;
}

/* ==========================================================================
   Level Badges
   ========================================================================== */

.level-badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  font-size: 0.875em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.5em;
}

.level-badge.level-a2 {
  background-color: #28a745;
  color: #ffffff;
}

.level-badge.level-b1 {
  background-color: #007bff;
  color: #ffffff;
}

/* ==========================================================================
   Homepage Sections
   ========================================================================== */

.intro-section {
  text-align: center;
  padding: 3em 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  margin-bottom: 3em;
  border-radius: 1em;
}

.intro-section h1 {
  color: #ffffff;
  margin-bottom: 0.5em;
  font-size: 2.5em;
}

.intro-section .lead {
  font-size: 1.25em;
  margin-bottom: 2em;
  opacity: 0.95;
}

.level-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2em;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1em;
}

.level-box {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2em;
  border-radius: 1em;
  transition: transform 0.3s ease;
}

.level-box:hover {
  transform: translateY(-5px);
}

.level-box h3 {
  color: #ffffff;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.level-box p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ==========================================================================
   Featured Section
   ========================================================================== */

.featured-section {
  margin: 3em auto;
  max-width: 1400px;
}

.featured-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #ffffff;
  padding: 0.5em 1.5em;
  border-radius: 2em 2em 0 0;
  font-weight: 700;
  font-size: 0.875em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -1px;
}

.featured-badge i {
  margin-right: 0.5em;
}

.featured-card {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  border: 3px solid #f5576c;
  border-radius: 0 1em 1em 1em;
  padding: 2em;
  box-shadow: 0 10px 40px rgba(245, 87, 108, 0.2);
  transition: all 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(245, 87, 108, 0.3);
}

.featured-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2em;
}

.featured-text h2 {
  color: #2c3e50;
  margin: 0 0 0.5em 0;
  font-size: 1.75em;
}

.featured-text p {
  color: #34495e;
  margin: 0;
  font-size: 1.1em;
  line-height: 1.6;
}

.featured-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  padding: 1em 2em;
  border-radius: 2em;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.featured-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: #ffffff;
}

.featured-btn i {
  margin-left: 0.5em;
  transition: transform 0.3s ease;
}

.featured-btn:hover i {
  transform: translateX(5px);
}

@media (max-width: 768px) {
  .featured-content {
    flex-direction: column;
    align-items: stretch;
  }

  .featured-btn {
    text-align: center;
  }

  .featured-text h2 {
    font-size: 1.5em;
  }
}

/* ==========================================================================
   Filter Section
   ========================================================================== */

.filter-section {
  margin-bottom: 2em;
}

.filter-section h2 {
  margin-bottom: 1em;
}

.filter-buttons {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5em 1.5em;
  border: 2px solid #dee2e6;
  background: #ffffff;
  color: #495057;
  border-radius: 2em;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.filter-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #ffffff;
}

/* ==========================================================================
   Articles Grid
   ========================================================================== */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2em;
  margin-bottom: 3em;
  max-width: 100%;
}

/* Force grid to show multiple columns on larger screens */
@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 1em;
  padding: 1.5em;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.article-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
  border-color: #007bff;
}

.article-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}

.article-date {
  color: #6c757d;
  font-size: 0.875em;
}

.article-title {
  margin: 0 0 1em 0;
  font-size: 1.25em;
}

.article-title a {
  color: #212529;
  text-decoration: none;
}

.article-title a:hover {
  color: #007bff;
}

.article-excerpt {
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 1em;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 1em;
  font-size: 0.875em;
  color: #6c757d;
}

.article-meta i {
  margin-right: 0.25em;
}

.topics {
  display: flex;
  gap: 0.5em;
}

.topic-tag {
  background: #e9ecef;
  padding: 0.25em 0.5em;
  border-radius: 0.25em;
  font-size: 0.875em;
}

.read-more {
  color: #007bff;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
}

.read-more:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* ==========================================================================
   Article Content
   ========================================================================== */

.article-meta {
  display: flex;
  gap: 1.5em;
  margin: 1.5em 0;
  padding: 1em;
  background: #f8f9fa;
  border-radius: 0.5em;
}

.page__sources {
  margin-top: 1em;
  padding: 1em;
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 0.25em;
}

/* Vocabulary Section Styling */
.page__content h2 {
  color: #007bff;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5em;
  margin-top: 2em;
}

.page__content ul li strong {
  color: #212529;
  font-weight: 700;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2em;
  padding: 2em 0;
}

.pagination-btn {
  padding: 0.75em 1.5em;
  background: #007bff;
  color: #ffffff;
  text-decoration: none;
  border-radius: 0.5em;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.pagination-info {
  color: #6c757d;
  font-weight: 600;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .intro-section h1 {
    font-size: 2em;
  }

  .level-info {
    grid-template-columns: 1fr;
  }

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

  .filter-buttons {
    justify-content: center;
  }

  .pagination {
    flex-direction: column;
    gap: 1em;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .filter-section,
  .pagination,
  .article-meta,
  .page__share {
    display: none;
  }

  .article-card {
    border: 1px solid #000;
    page-break-inside: avoid;
  }
}
