/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body, html {
  font-family: Poppins;
  height: 100%;
  background: #f5f5f5;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
}

/*#results-scroll {
  height: 100vh;                
  overflow-y: auto;            
  padding-bottom:350px;
  scrollbar-width: none;   
  -ms-overflow-style: none; 

#results-scroll
  display: none;*/

body, html {
  height: 100%;
  /*overflow: auto;              Prevent page scroll */
}

.container {
  width: 75%;
  max-width: 1200px;
  margin: 0 auto;
}


header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #3DBEF9, #94D046);
  color: white;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  justify-content: space-between;
  z-index: 1000;
 
}

.search-bar-container {
  display: flex;
  gap: 10px;
  top: 60px;
  margin-top: 100px;
  z-index: 999;
  gap: 0;
  width: 100%;
}


.search-bar-container input {
  flex: 6;
  padding: 12px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  height: 48px;
}

.search-bar-container select {
  flex: 2.5;
  padding: 12px;
  border: 1px solid #ccc;
  border-left: none;
  border-right: none;
  border-radius: 0;
  background: #fff;
  height: 48px;
}

.search-bar-container button {
  flex: 1.5;
  padding: 12px 20px;
  background: #3f51b5;
  color: white;
  border: 1px solid #3f51b5;
  border-left: none;
  border-radius: 0 4px 4px 0;
  height: 48px;
  cursor: pointer;
}
.results-header-child{
    display: flex;
    flex-direction: column;
    
}



@media (max-width: 768px) {
  .search-bar-container {
    flex-direction: column;
    align-items: stretch;
  }
  .separator {
  display: none;
}

  .search-bar-container input,
  .search-bar-container select,
  .search-bar-container button {
    flex: none;
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #efefef;
  }
  .sidebar select,
.sidebar input[type="date"] {
    padding: 6px;
  margin-top: 6px;
  border-radius: 4px;
}


  .search-bar-container button {
    background: #3f51b5;
    color: white;
    border: none;
  }

  .search-bar-container input {
    border-right: 1px solid #ccc;
  }
}


.sidebar input[type="date"] {
  width: 100%;
  border: none;
  padding: 12px;
}
/* .search {
  display: flex;
  gap: 10px;
}
.search input, .search select {
  padding: 5px;
}
.search button {
  padding: 6px 12px;
  background: white;
  color: #3f51b5;
  border: none;
  cursor: pointer;
  border-radius: 4px;
} */
.avatar {
  background: #1a237e;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: bold;
}

.results-sort {
  padding: 12px;
  height: 48px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 0.95rem;
}
.results-sort:focus {
  outline: none;
  border-color: #3f51b5;
}


.layout {
  display: flex;
  align-items: flex-start;
  padding-top: 120px;
  min-height: 100vh;
}
.sidebar-inner.fixed {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.send-email-button{
  padding: 12px;
  background: #3f51b5;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease
}
#sendBtnText{
  padding: 12px;
  background: #3f51b5;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease
}

/* Sidebar */
.sidebar {
  /* width: 320px;
  height:100%;
  background: linear-gradient(to right, #3DBEF9, #94D046);
  padding: 2em;
  color: white;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  color: #fff;
  border-radius: 12px;
  position: sticky;
  top: 100px; */
  width: 320px;
  /* align-self: flex-start;
  z-index: 999;
  max-height: unset; */
}
.sidebar-inner {
  max-height: calc(100vh - 0px); /* Adjust for top offset if needed */
  position: sticky;
  /* overflow-y: auto; */
  background: linear-gradient(to right, #3DBEF9, #94D046);
  padding: 2em;
  color: #fff;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}
.sidebar br{
  display:none;
}
.sidebar .filter-body.dropdown-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.sidebar .dropdown {
    width: 100%;
    max-width: 250px;
    padding: 12px;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #333;
    min-height: 45px;
}

.sidebar .dropdown select{
    width: 100%;
    max-width: 190px;
    padding: 12px;
    font-size: 0.95rem;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #333;
    min-height: 45px;
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    max-width: 250px;
}

.selected-tags .tag {
    background: #f0f0f0;
    color:black;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
}


.filter {
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.filter-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  padding: 15px 0;
}

.chevron {
  transition: transform 0.3s ease;
}
/* .filter.collapsed .filter-body {
  display: none;
} */
.filter-body {
  overflow: hidden;
  max-height: 50vh; /* big enough to cover content */
  transition: max-height 0.4s ease;
}
.filter-body label {
  display: block;
  margin-bottom: 16px; /* or 16px for more space */
  cursor: pointer;
}


.filter.collapsed .filter-body {
  max-height: 0;
  transition: max-height 0.3s ease;
}

.filter.collapsed .chevron {
  transform: rotate(-90deg);
}
.filter-body input[type="date"] {
  display: block;
  margin-top: 8px;
  margin-bottom: 8px;
  padding:10px;
  border-radius: 8px;
}


/* Main Content */
main {
  flex: 1;
  padding: 20px 2em; /* top-bottom: 20px, left-right: 2em */
}

.results-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.news-card {
  display: flex;
  gap: 20px;
  background-color: white;
  padding: 40px;
  border-radius: 8px;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.news-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 5px;
}

.news-text {
  flex: 1;
}

.news-title {
    font-family: Poppins;
  font-size: 0.95rem;
  font-weight: bold;
  color: #222;
  margin-bottom: 15px;
}

.news-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.news-snippet {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 12px;
}

.news-link {
  color: #3f51b5;
  font-weight: 500;
  text-decoration: none;
}

.news-thumbnail {
  width: 100px!important;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  max-height:150px;
}
.news-thumbnail-article {
  width: 350px!important;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}


.header-content {
  display: flex;
  align-items: center;
}

.spacer {
  flex: 1;
}

.avatar {
  background: #1a237e;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: bold;
  color: white;
}
.separator {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #aaa;
  font-size: 20px;
  background: #fff;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}
select{
  padding: 0 15px;
  height: 32px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 0.95rem;
  width: 100%;
}
.media-house{
    display: inline-grid;
}
.clear-filters {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.search-now{
    width: 100%;
  padding: 10px;
  margin-top: 10px;
  background-color: transparent;
  border: 1px solid white;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
    
}

.clear-filters:hover {
  background-color: white;
  color: #0072ff;
}
/* Toggle Sidebar Button (mobile only) */
.toggle-sidebar {
  display: none;
  margin: 10px auto;
  padding: 10px 15px;
  font-size: 16px;
  border: none;
  background-color: #3f51b5;
  color: white;
  border-radius: 4px;
  cursor: pointer;
}
.close-sidebar{
  display:none;
}
#closeSidebar{
  display:none!important;
}

/* Responsive Rules */
@media only screen and (max-width: 400px) {
    .results-header{
      flex-direction: column!important;
  }
    
}


@media (max-width: 768px) {
  .toggle-sidebar {
    display: block;
  }
 

  .layout {
    flex-direction: column;
  }

 .sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(to bottom, #009688, #3f51b5);
  padding: 0 2em;
  transition: left 0.3s ease;
  /* z-index: 2000; */
  overflow-y: auto;
  border-radius: 0;
}

.sidebar.open {
  left: 0;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
}

.overlay.show {
  display: block;
}

  main {
    margin-left: 0;
    padding: 20px 1em;
  }

  .search-bar-container {
    flex-direction: column;
    gap: 10px;
  }
  

  .search-bar-container input,
  .search-bar-container select,
  .search-bar-container button {
    width: 100%;
    border-radius: 4px;
  }

  .news-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-thumbnail {
    width: 100%;
    height: auto;
    margin-top: 15px;
  }
}
/* Login */
/* Login Page Layout */
.login-page {
  background: #f5f7fa;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 120px;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}

.login-card h2 {
  margin-bottom: 10px;
  color: #333;
}

.login-card p {
  margin-bottom: 20px;
  color: #666;
  font-size: 0.95rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
}

.login-form input {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  background: transparent;
}

.login-form button {
  padding: 12px;
  background: #3f51b5;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}
.meh button{
     padding: 12px;
  background: #3f51b5;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 10px;
  transition: background 0.3s ease;
  
    
}

.login-form button:hover {
  background: #303f9f;
}

.login-footer {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.login-footer a {
  color: #3f51b5;
  text-decoration: none;
}
.header-content {
  display: flex;
  align-items: center;
  height: auto;
  justify-content: center; /* center the logo horizontally */
}
/* Articles CSS */

/* Typography override for headline */
.article-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #222;
}

.article-meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
}

.article-content p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Wrapper for article layout */
.article-wrapper {
  display: flex;
  gap: 40px;
  margin-top: 150px;


}

/* Left: Article body */
.article-main {
  flex: 3;
}

/* Right: Sidebar with featured image */
.article-sidebar {
  flex: 2;
}

.article-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  object-fit: cover;
}
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.close {
  position: absolute;
  top: 10px;
  right: 25px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
}
.published-by {
  margin-top: 20px;
  text-align: center;
  color: #555;
  font-size: 0.9rem;
}

.publisher-logo {
  width: 60px;
  height: auto;
  margin-top: 5px;
}

.article-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.article-actions a {
  color: #3f51b5;
  text-decoration: none;
  transition: transform 0.2s;
}

.article-actions a:hover {
  transform: scale(1.1);
}

.icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
.article-meta-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 0 5px;
}

.published-by-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #555;
}

.publisher-logo {
  width: 60px;
  height: auto;
}

.article-actions {
  display: flex;
  gap: 16px;
}

.article-actions a {
  color: #3f51b5;
  text-decoration: none;
  transition: transform 0.2s;
}

.article-actions a:hover {
  transform: scale(1.1);
}

.icon {
  width: 24px;
  height: 24px;
}
#tagContainer{
  display: flex;
  flex-wrap: wrap;
  gap: 4px; /* space between tags */
  padding-bottom: 25px;
  border-bottom: 1px solid #ccc;

}
#tagContainer .tag-green{
padding:4px 8px;
background-color: #e6ffee;
font-size: 13px;
color:black;
border-radius: 8px;
}
#tagContainer .tag-blue{
padding:4px 8px;
font-size: 13px;
color:black;
border-radius: 8px;
background: #1E90FF!important;
}
#tagContainer .tag-red{
padding:4px 8px;
font-size: 13px;
color:black;
border-radius: 8px;
background: #E79495!important;
}


#tagContainer div{
  margin: 0 10px 0 0;
}
#keywordInput{
  padding: 12px 25px!important;
  box-shadow: none!important;
  border-radius: 10px!important;
  width: 100%!important;
  border:none;
}

@media (max-width: 768px) {
  .article-wrapper {
    flex-direction: column;
  }

  .article-main {
    order: 1;
    width: 100%;
  }

  .article-sidebar {
    order: 2;
    width: 100%;
    margin-top: 30px;
  }

  .article-image {
    width: 100%;
    height: auto;
  }

  .article-meta-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
  }

  .published-by-inline {
    justify-content: center;
  }

  .article-actions {
    justify-content: center;
  }
}
.login-loading {
  margin-top: 20px;
  text-align: center;
  color: #3f51b5;
  font-size: 0.95rem;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 4px solid #ccc;
  border-top: 4px solid #3f51b5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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

 .dropdown-container {
      position: relative;
      width: 300px;
    }

    .dropdown {
      
      padding: 10px;
      font-size: 16px;
    }

    .selected-tags {
      margin-top: 10px;
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      max-width: 190px;
    }

    .tag {
      padding: 5px 10px;
      border-radius: 20px;
      display: flex;
      align-items: center;
    }

    .tag .remove {
      margin-left: 8px;
      cursor: pointer;
      color: red;
      font-weight: bold;
    }
    
    .tag-green {
  background-color: #7BCB79 !important;
}

.tag-red {
  background-color: #E79495 !important;
}
    .remove-tag {
      margin-left: 6px;
      background: none;
      border: none;
      cursor: pointer;
      color: red;
      font-weight: bold;
    }
.pagination{
    text-align:center;
    color:#444;
    
}

.pagination a{
    color: black;
    text-decoration:none;
    font-weight: 600;
    padding:0 5px;
    
}
.pagination .active{
    border-bottom:2px solid #3f51b5;
 
    
}
#selectedTags{
    max-width: 190px;
}

select#sort,
select.results-sort {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg fill='gray' height='18' viewBox='0 0 24 24' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>") no-repeat right 10px center;
  background-size: 16px;
  padding: 10px 35px 10px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  color: #333;
  transition: border-color 0.3s;
  min-width: 160px;
  cursor: pointer;
  min-height:36px;
  margin-bottom: 5px;
}

select#sort:focus,
select.results-sort:focus {
  border-color: #3f51b5;
  outline: none;
}

/* Optional hover effect */
select#sort:hover,
select.results-sort:hover {
  border-color: #3f51b5;
}
@media only screen and (max-width: 460px) {
    .results-header{
      flex-direction: column!important;
  }
  .separator{
      display:none;
  }
  .logo img{
      width: 150px;
  }
  .container{
      width: 95%;
  }
    
}
.select-checkbox {
  position: relative;
  top: 90px;
  left:15px;
  transform: scale(1.4);
  cursor: pointer;
}
/* Modal background */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
}

/* Modal content box */
.modal-content {
  background: #fff;
  max-width: 400px;
  width: 90%;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  font-family: Arial, sans-serif;
}

/* Close button (you can add this manually in HTML) */
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}
.modal-close:hover {
  color: #333;
}

/* Modal headings */
.modal-content h3 {
  margin-bottom: 15px;
  color: #27ae60;
  text-align: center;
}

/* Form labels */
.modal-content label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/* Input fields */
.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 25px;
  font-size: 14px;
  background-color: #f9f9f9;
  transition: border-color 0.3s;
}
.modal-content input:focus,
.modal-content textarea:focus {
  border-color: #2ecc71;
  outline: none;
  background-color: #fff;
}

/* Submit button */
  .button-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3969d5;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
  }

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