body {
  font-family: 'Lora', serif;
}
p, ul li, ol li {
  font-size: 1.3rem;
  line-height: 1.5;
}
ul, ol {
  padding-left: 0;
}

ul li, ol li {
  margin-bottom: .5rem;
  list-style-type: none;
  padding-left: 0;
}
#advertorial {
  background: #f4f4f4;
  display: flex;
  align-items: right;
  justify-content: right;
  padding: 5px;
}
.container {
  max-width: 940px;
  padding: 0 1rem;
  margin: auto;
  align-items: center;
}

#top-bar {
  background: #804C9E;
}
#top-bar .logo {
  max-width: 200px;
  color: #fff;
  font-size: 1.8rem;
  margin: 1rem 0;
}
#top-bar .logo a {
  color: #fff;
  text-decoration: none;
}

#top-bar .container {
  display: flex;
  gap: 4rem;
}
#top-bar .banner {
  max-width: 100%;
  height: auto;
}
.callout {
  background: #FFED03;
  padding: 1.5rem;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
}
h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  margin-top: 2rem;
  line-height: 1.2;
  font-weight: 700;
}
.author {
  font-size: 1rem;
  font-style: italic;
}
#content .intro {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.hero-image {
  margin-bottom: 1.5rem;
}
.callout-cta {
  background: #FFED03;
  padding: 2rem;
  margin: 1.5rem 0;
}
.callout-cta h2 {
  margin-bottom: 1.5rem;
  margin-top: 0;
}
.callout-cta p {
  margin-bottom: 1.5rem;
}
.callout-cta a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #000   
}

/* Native Widget - Related Articles */
#related-articles {
  margin-bottom: 2.5rem;
}

#related-articles h3 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

#related-articles hr {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 0;
  border-top: 3px solid #000;
}

#related-articles .cards {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

#related-articles .article {
  background: white;
  overflow: hidden;
}


#related-articles .article img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

#related-articles .article h4 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: 1rem;
  color: #333;
}

#related-articles .article a {
  text-decoration: none;
  color: inherit;
  display: block;
}

#related-articles .article a:hover h4 {
  color: #804C9E;
}

#footer {
  background: #4BACFF;
  padding: 1rem 0;
  color: #fff;
}
#footer .logo {
  color: #fff;
  margin-bottom: 0;
  font-size: 1.2rem;
  margin-top: 0;
}
#footer .logo a {
  color: #fff;
}
#footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#footer .footer-links a {
  color: #fff;
  font-size: .9rem;
  line-height: 1;
  margin-bottom: 0;
  text-decoration: none;
}


/* Share buttons */
.share {
  display: flex;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
  text-align: center; /* Center the buttons */
}

.share-button {
  margin: 0 5px;
  padding: 8px 15px;
  color: #fff !important; /* Ensure text is white */
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
}

.share-button:hover {
  opacity: 0.85;
}

.share-button.facebook {
  background-color: #3b5998;
}

.share-button.email {
  background-color: #777;
}

.share-button.whatsapp {
  background-color: #25d366;
}

/* Homepage Layout */
.homepage-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

.main-content {
  min-width: 0;
}

.main-content h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  color: #333;
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

.filter-group select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background: white;
}

.clear-btn {
  padding: 0.5rem 1rem;
  background: #804C9E;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  height: fit-content;
}

.clear-btn:hover {
  background: #6a3d82;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.article-card {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}


.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #ccc;
}

.ad-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FFED03;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.card-content {
  padding: 1.5rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.category {
  background: #804C9E;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.date {
  color: #666;
}

.card-title {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.card-title a {
  color: #333;
  text-decoration: none;
}

.card-title a:hover {
  color: #804C9E;
}

.card-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.card-footer .author {
  color: #666;
  font-style: italic;
}

.tags {
  display: flex;
  gap: 0.5rem;
}

.tag {
  background: #e9ecef;
  color: #495057;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* Sidebar */
.sidebar {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #333;
  border-bottom: 2px solid #804C9E;
  padding-bottom: 0.5rem;
}

.ad-space {
  text-align: center;
}

.ad-placeholder {
  background: #e9ecef;
  border: 2px dashed #adb5bd;
  padding: 2rem 1rem;
  border-radius: 4px;
  color: #6c757d;
}

.category-list {
  list-style: none;
  padding: 0;
}

.category-list li {
  margin-bottom: 0.5rem;
}

.category-link {
  color: #333;
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.category-link:hover {
  background: #e9ecef;
  color: #804C9E;
}

.count {
  color: #666;
  font-size: 0.8rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  background: #e9ecef;
  color: #495057;
  padding: 4px 8px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
}

.tag-link:hover {
  background: #804C9E;
  color: white;
}

.no-content {
  text-align: center;
  padding: 3rem;
  color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
  .homepage-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filters {
    flex-direction: column;
    gap: 1rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .main-content h1 {
    font-size: 2rem;
  }
  
  .sidebar {
    position: static;
  }
  
  /* Native Widget Mobile */
  #related-articles .cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #related-articles .article img {
    height: 160px;
  }
  
  #related-articles .article h4 {
    font-size: 1rem;
    padding: 0.8rem;
  }
  
  #top-bar .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  #related-articles .cards {
    gap: 0.8rem;
  }
  
  #related-articles .article h4 {
    font-size: 0.95rem;
    padding: 0.7rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
}

/* Hearing Test Popup Styles */
.hearing-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.hearing-popup-overlay.hearing-popup-show {
  opacity: 1;
}

.hearing-popup-overlay.hearing-popup-fade-out {
  opacity: 0;
}

.hearing-popup {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.hearing-popup-overlay.hearing-popup-show .hearing-popup {
  transform: scale(1);
}

.hearing-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.hearing-popup-close:hover {
  background: #f0f0f0;
  color: #333;
}

.hearing-popup-content {
  padding: 2.5rem 2rem 2rem;
}

.hearing-popup-content h2 {
  margin: 0 0 1.2rem 0;
  font-size: 1.8rem;
  color: #333;
  text-align: center;
}

.hearing-popup-content p {
  margin: 0 0 1.2rem 0;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #555;
  text-align: center;
}

.hearing-popup-benefits {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.hearing-popup-benefits ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hearing-popup-benefits li {
  padding: 0.5rem 0;
  font-size: 1rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hearing-popup-cta-text {
  font-weight: 600;
  color: #333 !important;
  margin-bottom: 1.5rem !important;
}

.hearing-popup-cta {
  display: block;
  background: #804C9E;
  color: white !important;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  margin: 0 auto;
  max-width: 300px;
}

.hearing-popup-cta:hover {
  background: #6a3d82;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(128, 76, 158, 0.3);
}

.hearing-popup-disclaimer {
  font-size: 0.85rem !important;
  color: #999 !important;
  text-align: center;
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .hearing-popup-content {
    padding: 2rem 1.5rem 1.5rem;
  }
  
  .hearing-popup-content h2 {
    font-size: 1.5rem;
  }
  
  .hearing-popup-content p {
    font-size: 1rem;
  }
  
  .hearing-popup-benefits {
    padding: 1rem;
  }
  
  .hearing-popup-cta {
    font-size: 1.1rem;
    padding: 0.9rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .hearing-popup {
    margin: 1rem;
  }
  
  .hearing-popup-content {
    padding: 1.5rem 1rem 1rem;
  }
  
  .hearing-popup-content h2 {
    font-size: 1.3rem;
  }
  
  .hearing-popup-benefits li {
    font-size: 0.9rem;
  }
}