/* ===== VARIABLES & RESET ===== */
:root {
  --red:        #e53b3b;
  --red-dark:   #b32424;
  --accent:     #ffce54;
  --bg-light:   #f9f9f9;
  --text-dark:  #333;
  --text-light: #fff;
  --muted:      rgba(0,0,0,.6);
  --radius:     12px;
  --shadow:     0 8px 24px rgba(0,0,0,.12);
  --transition: .25s ease;
  font-size:    16px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-light);
  color: var(--text-dark);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
}
a {
  text-decoration: none;
}

/* ===== FLEX UTILITIES ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex: 1; }
.center { justify-content: center; }
.center-v { align-items: center; }
.between { justify-content: space-between; }

/* ===== CONTAINER ===== */
.container {
  width: 90%;
  max-width: 960px;
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--red-dark), var(--red));
  color: var(--text-light);
}
.header-container {
  padding: 1rem 0;
}
.main-nav ul {
  list-style: none;
  gap: 1rem;
}
.main-nav ul li {
  display: inline-block;
}
.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .8rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  color: var(--text-light);
}
.main-nav a:hover {
  background: rgba(255,255,255,.1);
}
.main-nav i {
  font-size: 1.2rem;
}

/* ===== SEARCH SECTION ===== */
.search-section {
  background: var(--red-dark);
  color: var(--text-light);
  text-align: center;
  padding: 3rem 0 4rem;
}
.search-section h2 {
  font-size: 2.4rem;
  margin-bottom: .5rem;
}
.search-section p {
  color: rgba(255,255,255,.85);
  margin-bottom: 1.5rem;
}
.search-card {
  background: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  padding: 1.8rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.search-form {
  display: flex;
  gap: .5rem;
}
.search-form input {
  flex: 1;
  padding: .7rem 1rem;
  border-radius: var(--radius);
  border: 1px solid #ddd;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--text-light);
  color: var(--red-dark);
  border: 2px solid var(--red-dark);
  padding: .7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: background var(--transition), transform .2s;
}
.btn-primary:hover {
  background: var(--red-dark);
  color: var(--text-light);
  transform: translateY(-2px);
}

/* ===== FAQ GRID ===== */
.search-results {
  flex: 1;
  padding: 2.5rem 0;
}
.search-results h3 {
  font-size: 1.6rem;
  color: var(--red-dark);
  margin-bottom: 1rem;
}
/* Remove default bullets */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 1.2rem;
}
.article-card {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card a {
  display: block;
  padding: 1.4rem;
  color: var(--text-dark);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.15);
}
.article-card h4 {
  margin-bottom: .6rem;
}
.article-card p {
  color: var(--muted);
  font-size: .95rem;
}
.read-more {
  display: inline-block;
  margin-top: .8rem;
  color: var(--red);
  font-weight: 600;
  transition: text-decoration var(--transition);
}
.read-more:hover {
  text-decoration: underline;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: 2rem;
}
.page-btn {
  padding: .6rem .9rem;
  border-radius: var(--radius);
  background: #fff;
  color: var(--red-dark);
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.page-btn:hover:not(.disabled):not(.active) {
  background: var(--red);
  color: var(--text-light);
}
.page-btn.disabled {
  opacity: .5;
  cursor: default;
}
.page-btn.active {
  background: var(--red-dark);
  color: var(--text-light);
  cursor: default;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--red-dark);
  color: var(--text-light);
  text-align: center;
  padding: 1rem 0;
  font-size: .9rem;
}
.site-footer a {
  color: var(--accent);
}
.site-footer a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .article-list {
    grid-template-columns: 1fr;
  }
}
