* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px; /* Default font size */
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding: 10px 10px 20px;
  font-size: 1rem; /* Base font size (16px by default) */
}

  .adcontainer 
  {
  display: flex;               
  justify-content: center;     
  align-items: center;         
  margin-top: 20px;   
  margin-bottom: 20px;   
  }

h1 {
  text-align: center;
  font-size: 2.188rem; /* Default header font size */
}

nav {
  text-align: center;
  background-color: #333;
}

nav ul {
  list-style: none;
  padding: 0;
}

nav ul a {
  text-decoration: none;
  color: white;
  padding: 10px 20px;
  display: inline-block;
  font-size: 1.25rem;
}

nav ul a:hover {
  background-color: #575757;
}

.subtit {
  text-align: left;
  font-size: 1.125rem;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.card {
  width: 70%;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 5px;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  
}

.card .content {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  width: 100%;
}

.card img {
  width: 150px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center;
  
}

.card .text {
  flex: 1;
}

.card h2 {
  margin: 0;
  font-size: 1.5rem;
}

.card p {
  margin: 5px 0;
  color: #555;
  text-align: justify;
  max-height: 4.5em;
  

}

.button-container {
  display: flex;
  justify-content: flex-end; /* Align button to the right */
}

.read-more-btn {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-weight: bold;
  color: #007BFF;
  cursor: pointer;
}

.read-more-btn.less { 
    background-color: #FF3B30; /* Red for "Less" */
}

/* Expanded Styles */

.expanded .content {
  flex-direction: column;
  align-items: center;
}

.expanded img {
  width: 30%;
  height: auto;
}

.expanded .text {
  width: 100%;
}

.expanded h2 {
  text-align: center;
}
.expanded p{
  text-align: left;
  max-height: 1000px;
  margin: 10px;
}

.expanded .read-more-btn{
  color: rgba(255, 0, 0, 0.83);
  margin-right: 20px;
}

.source {
  display: none; 
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.source a {
    color: #007bff;
    text-decoration: underline;
}
.expanded .source {
  display: block; 
}

/* Mobile Styles */
@media only screen and (max-width: 1000px) {
  body {
    font-size: 14px; /* Adjust font size for smaller screens (mobile) */
  }

  h1 {
    font-size: 1.5rem; /* Smaller header font for mobile */
  }
  .card{
    width: 100%;
    margin-left: 15px;
    margin-right: 15px;
  }

  .card img {
    width: 80px; /* Make image smaller */
    height: 110px; /* Make image smaller */
  }

  .card h2 {
    font-size: 1rem; /* Smaller title font on mobile */
  }

  .card p {
    font-size: 0.9rem; /* Smaller content font for mobile */
    max-height: 4rem; /* Adjust the content height for better readability */
  }

  .subtit {
    font-size: 1rem; /* Adjust subtitle font size */
    text-align: center;
  }
  .expanded img {
    width: 50%;
    height: auto;
  }
  .expanded p{
    text-align: left;
    max-height: 1000px;
    font-size: 1rem;
  }
}

/* Desktop Styles (optional) */
@media only screen and (min-width: 1001px) {
  body {
    font-size: 16px; /* Standard font size for desktop */
  }

  h1 {
    font-size: 2.188rem;
  }

  nav ul a {
    font-size: 1.25rem;
  }

  .subtit {
    font-size: 1.125rem;
  }

  .card h2 {
    font-size: 1.25rem;
  }

  .card p {
    font-size: 1.125rem;
  }
}
