/* Subtitles */
.quick-stats h3,
.filters h3,
.faq h3,
.editors-choice h3,
.related-articles h3 { margin: 30px 0; font-family: "Roboto", Helvetica, Arial, sans-serif; font-size: 28px; color: #000; text-align: center;   /* This is enough */ position: relative;}

.quick-stats h3::after,
.filters h3::after,
.faq h3::after,
.editors-choice h3::after,
.related-articles h3::after { content: ""; display: block; width: 60px; /* fixed width looks cleaner */ height: 2px; background-color: #199EB8; margin: 10px auto 0; /* auto centers it */ border-radius: 2px;}
.related-articles p { font-family: 'Roboto', 'Champagne', sans-serif; font-size: 16px; color: #000000; }
  
/* Quick Stats Section */
.quick-stats { background: #f8f9fa; padding: 50px 0; margin-bottom: 40px; border-radius: 8px;}
.stat-item { margin-bottom: 25px;}
.stat-number { font-size: 2.4rem; font-weight: 600; color: #007BFF; font-family: 'Roboto', sans-serif;}
.stat-label { font-size: 1.4rem!important; font-family: 'Roboto', sans-serif; color: #555; margin-top: 8px; letter-spacing: 0.5px;}  
  
/* Filters */  
.filters { margin:1rem 0; text-align: center;}
.filters-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.filters select, .filters input { height: 48px;  padding:0.5rem; font-size:1.2rem!important; box-sizing: border-box;}
/* Mobile portrait: 1 per row */
@media (max-width: 767.98px) and (orientation: portrait) {
  .filters-controls {
    flex-direction: column;
    align-items: center;
  }

  .filters-controls select,
  .filters-controls input {
    width: 90%;
    max-width: 400px;
  }
}

/* Mobile landscape: 2 per row */
@media (max-width: 767.98px) and (orientation: landscape) {
  .filters-controls {
    flex-direction: row;
    justify-content: center;
  }

  .filters-controls select,
  .filters-controls input {
    width: 48%;
    max-width: none;
  }
}

/* Card Grid  Section */
.grid { display: grid; gap: 1rem; padding: 1rem; align-items: stretch; }
@media (min-width:1200px){ .grid{ grid-template-columns:repeat(4,1fr); } }
@media (min-width:900px) and (max-width:1199px){ .grid{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:600px) and (max-width:899px){ .grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:599px){ .grid{ grid-template-columns:1fr; } }

.grid-item a { display:flex; flex-direction:column; height:100%; text-decoration:none; color:inherit; background:white; border-radius:8px; overflow:hidden; border:1px solid #ddd; transition: transform 0.3s, box-shadow 0.3s; }
.grid-item a:hover { transform: scale(1.03); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

.grid-item img { width:100%; height:250px; object-fit:cover; border-bottom: 1px solid #ddd; border-radius: 4px 4px 0 0;}
.grid-item .content { flex:1; display:flex; flex-direction:column; justify-content:flex-start; padding:0.5rem 1rem 1rem; }
.grid-item h3 { margin:0.5rem 0 0.3rem; display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; font-size:1.4rem!important; }
.grid-item p { margin:0.2rem 0; color:#555; font-size:1.2rem!important; }
.top-choice-badge { background:gold; color:black; font-weight:bold; padding:0.2rem 0.5rem; border-radius:4px; font-size:1.2rem!important; }

/* Pagination */
.pagination { display:flex; justify-content:center; margin:2rem 0; gap:0.5rem; flex-wrap:wrap; }
.pagination button { padding:0.5rem 1rem; border:none; background:#0077b6; color:white; cursor:pointer; border-radius:4px; font-size:1rem; }
.pagination button.disabled { background:#ccc; cursor:default; }

/* FAQ Section Styles */
.faq { padding:4rem 1rem; max-width:800px; margin:0 auto;}
.faq h2 {font-family: 'Roboto', sans-serif; font-size: 2.5rem; font-weight: 500; text-align: center; color: #222; margin-top: 0; margin-bottom: 1.75rem; position: relative; padding-bottom: 0.5rem;}
.faq h2::after {content: ""; display: block; width: 60px; height: 2px; background-color: #007BFF; margin: 0.5rem auto 0 auto; border-radius: 2px;}
.faq-item { margin-bottom:0.50rem!important; }
.faq-answer { display:none; padding-left:0.5rem; }
.faq-question { background:#0077b6; color:white; border:none; width:100%; text-align:left; padding:0.4rem; cursor:pointer; border-radius:4px; margin-bottom:0.2rem; font-size:1.4rem!important; }

/* Editor's Choices Section */
.editors-choice { background-color: #f7f9fb; padding: 4rem 1rem;}
.editors-choice h2 { font-family: 'Roboto', sans-serif; font-size: 2.5rem!important; font-weight: 500; text-align: center; color: #222; margin-bottom: 2rem; position: relative; padding-bottom: 0.5rem;}
.editors-choice h2::after { content: ""; display: block; width: 60px; height: 2px; background-color: #007BFF; margin: 0.5rem auto 0; border-radius: 2px;}
.editors-choice .card-title { font-family: 'Roboto', sans-serif; font-size: 1.6rem!important; font-weight: 500; margin-bottom: 0.3rem;}
.editors-choice .card-text { font-family: 'Roboto', sans-serif; font-size: 1.4rem!important; color: #555;}
.editors-choice .card img { width: 100%; /* make image span the full width of the card */ height: 250px; /* fixed height for uniform cards */ object-fit: cover; /* crop edges but keep aspect ratio */ border-top-left-radius: 8px; border-top-right-radius: 8px;}
.editors-choice .btn-primary { font-size: 1.2rem!important; padding: 0.5rem 1rem;}
/* Mobile landscape: show 2 cards */
/* Mobile landscape: show 2 cards per row */
/* Mobile landscape: force 2 cards per row */
@media (max-width: 767.98px) and (orientation: landscape) {
  .editors-choice .row {
    display: flex;
    flex-wrap: wrap;
  }

  .editors-choice .row > div {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* Related Articles Section */
.card img { object-fit: cover; height: 180px;}
.related-articles .row { margin-top: 2rem; /* or 32px, or whatever fits your design */}
.related-articles .card-title { font-size: 16px; font-weight: 600; font-family: 'Roboto', sans-serif; color: #000; margin-bottom: 0.5rem;}
.related-articles .card-text { font-size: 14px; font-weight: 400; font-family: 'Roboto', sans-serif; color: #000;}

@media (max-width: 576px) {
  .related-articles .card-title {
    font-size: 16px;
    font-weight: 600;
  }

  .related-articles .card-text {
    font-size: 15px;
  }
}

/* Tablet / landscape mobile: 2 per row */
@media (max-width: 767px) {
  .related-articles .card {
    flex: 0 1 calc(50% - 1rem);
  }
}

@media (max-width: 576px) {
  .related-articles .card {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Makes sure border wraps image */
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  }

  .related-articles .card-img-top { width: 100%; height: auto; object-fit: cover; display: block; }
  .related-articles .card-body { padding: 15px; }
}

