
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;600;700&display=swap');

:root {
  --black: #1c1c1c;
  --gray: #7E7E7E;
  --gray-light: #E4E4E4;
  --red: #b30000;
  --font-size-base: 1rem;
  --font-size-md: clamp(1.25rem, 0.61vw + 1.1rem, 1.58rem);
  --font-size-lg: clamp(1.56rem, 1vw + 1.31rem, 2.11rem);
  --font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
  --border-radius: 10px;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--black);
  font-size: var(--font-size-base);
  background-color: #FAF5EE;
  background-image: url("/img/img-noise-361x370.png");
  margin: 0;
}

a { color: var(--black); }
h1 { font-size: var(--font-size-xl); }
h2 { font-size: var(--font-size-lg); }
h3 { font-size: var(--font-size-md); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.75rem;
  margin-bottom: 1rem;
}

.btn {
  background-color: var(--black);
  border: none;
  color: white; 
  padding: 16px 32px;
  text-decoration: none;
  margin: 4px 2px; 
  cursor: pointer;
}

.btn-delete {
  padding: 10px 16px;
  background-color: var(--red);
}


img {
  width: 100%;
  height: auto;
}

/* Layout */
.container {
  max-width: 982px;
  margin: 0 auto;
  padding: 0 10px;
}

.main {
  padding: 20px 0;
}

/* Hero Section */
.hero-image {
  max-height: 528px;
  filter: drop-shadow(0px 44px 34px rgba(0, 0, 0, 0.25));
  overflow: hidden;
  border-radius: var(--border-radius);
}


/* Main Header */
.header {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas: 
  "logo button"
  "menu menu";
  padding-top: 10px;
}

@media only screen and (min-width: 768px) {
  .header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 
    "logo menu button";
  }
}

.header__logo {
  font-weight: 800;
  font-size: 25px;
  text-decoration: none;
  grid-area: logo;
}

.header__logo:hover {
  text-decoration: underline;
}

.header__nav {
  justify-content: center;
  display: flex;
  grid-area: menu;
}

.header__logo, .header__nav, .header__button {
  width: 100%;
}

.header__button {
  display: flex;
  justify-content: end;
  grid-area: button;
}

.header__button button {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  border: 0;
  padding: 6px 12px;
  background: none;
  border-radius: 10px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}

.header__button button:hover {
  border: 2px solid var(--black);
}

/* Header -> Navigation */
.header__nav ul {
  list-style-type: none;
  display: flex;
  gap: 1rem;
  font-weight: 600;
  padding: 0;
}

.header__nav ul a {
  padding: 10px;
  text-decoration: none;
}

.header__nav ul a.active {
  color: #7E7E7E;
}

.header__nav ul a:hover {
  text-decoration: underline;
}

/* Author - HomePage */
.author {
  padding: 10px 0;
  text-align: center;
}

.author__heading {
  margin-top: 10px;
  margin-bottom: 5px;
}

.author__body {
  font-size: var(--font-size-md);
  margin: 5px 0 40px 0;
}


/* Home Article List */
.articles__heading {
  margin-top: 4rem;
  font-weight: 400;
}

.article-ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  font-size: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
  display: flex;
  flex-direction: column;
}

.article-list__date {
  font-size: 1rem;
  color: var(--gray);
  width: 100px;
  display: inline-block;
  width: 260px;
}

.article-ul li a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  margin: 18px 0;
}

@media only screen and (min-width: 768px) {
  .article-ul li a {
    flex-direction: row;
    align-items: center;
  }

  .article-list__date {
    text-align: right;
  }
}

.article-ul li {
  font-size: 24px;
  cursor: pointer;
  transition: filter 0.1s;
}

.article-ul li:not(:last-child) {
  border-bottom: 1px solid var(--gray-light);
}

.article-ul li:hover {
  filter: none;
}

.article-ul:hover li {
  filter: blur(3px);
}

.article-ul:hover li:hover {
  filter: none;
}


.article {
  white-space: pre-wrap;
}


/* Footer */
.footer {
  /* margin: 4rem; */
  text-align: center;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #a39f9f;
  color: #000;

}


/* Dashboard Admin */
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-posts {
  padding: 0;
  margin: 0;
}

.admin-post-controls form {
  display: inline-block;
}

.admin-post-controls .btn  {
  display: inline-block;
  background-color: var(--black);
  color: var(--gray-light);
  border: 0;
  text-decoration: none;
  font-size: .8rem;
  padding: 4px 8px;
  line-height: 2;
}

.admin-posts li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

/* SeachBar */
.searchBar {
  visibility: hidden;
  transform: translateY(-100px);
  background-color: var(--black);
  padding: 4px 0;
  position: absolute;
  left: 0;
  right: 0;
}


.searchBar.open {
  transform: translateY(0);
  transition: transform 0.1s;
}

.searchBar input {
  margin: 0;
  border: 0;
}

#searchClose {
  position: absolute;
  top: 0;
  right: 0;
  color: var(--gray-light);
  padding: 15px;
}


.pagination {
  font-size: 1.3rem;
  color: var(--gray);
  text-decoration: none;
  margin-top: 40px;
  display: inline-block;
}

.pagination:hover {
  color: var(--black);
}


/* About us page  */
.welcome-section {
  background-color: #f9f9f9;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  margin: auto;
}

.welcome-section h2 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.welcome-section p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.features-list {
  list-style-type: none;
  padding: 0;
}

.features-list li {
  background: #e0f7fa;
  border-left: 5px solid #00796b;
  padding: 10px 15px;
  margin-bottom: 10px;
  transition: background 0.3s;
}

.features-list li:hover {
  background: #b2ebf2;
}

.welcome-section a.cta-button {
  display: inline-block;
  background-color: #00796b;
  color: white;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.2rem;
  margin: 20px auto;
  text-align: center;
  transition: background 0.3s;
}

.welcome-section a.cta-button:hover {
  background-color: #004d40;
}

#dark-mode-toggle {
  padding: 10px 20px; /* Adjust padding for size */
  background-color: var(--black); /* Use a color variable for consistency */
  color: white; /* Text color */
  border: none; /* Remove border */
  border-radius: var(--border-radius); /* Use consistent border radius */
  cursor: pointer; /* Change cursor on hover */
  font-size: 16px; /* Adjust font size */
  font-family: 'Poppins', sans-serif; /* Match font family */
  transition: background-color 0.3s; /* Smooth transition */
}

#dark-mode-toggle:hover {
  background-color: var(--gray); /* Change background on hover */
}

/* Dark Mode Styles */
/* Dark Mode Styles */
body.dark-mode {
  background-color: #1c1c1c; /* Dark background */
  color: #E4E4E4; /* Light text color for general text */
  background-image: none;
}
* Dark Mode for About page */
body.dark-mode .welcome-section {
  background-color: #2c2c2c; /* Dark background */
  color: #E4E4E4; /* Light text color */
}

body.dark-mode .welcome-section h2 {
  color: #E4E4E4; /* Heading color in dark mode */
}

body.dark-mode .features-list li {
  background: #3c3c3c; /* Match feature list item background in dark mode */
  color: #E4E4E4; /* List text color */
}

body.dark-mode .welcome-section a.cta-button {
  background-color: #00796b; /* Keep CTA button color */
  color: white; /* Keep text color */
}
body.dark-mode a {
  color: #E4E4E4; /* Light color for links */
}

body.dark-mode .btn {
  background-color: #3c3c3c; /* Button background for dark mode */
  color: var(--black); /* Button text color for dark mode */
}

body.dark-mode .btn-delete {
  background-color: #f44336; /* Keep delete button red */
  color: white; /* Text color for delete button */
}

body.dark-mode .header__button button {
  color: #E4E4E4; /* Header button text color */
  border: 2px solid #E4E4E4; /* Light border for visibility */
}

body.dark-mode .welcome-section {
  background-color:  #2c2c2c; /* Dark background for the welcome section */
  color: #E4E4E4; /* Light text color for the welcome section */
}

body.dark-mode .features-list li {
  background: #3c3c3c; /* Dark background for feature list items */
}

body.dark-mode .welcome-section a.cta-button {
  background-color: #00796b; /* Keep CTA button color */
  color: white; /* Keep text color for CTA button */
}

body.dark-mode .pagination {
  color: #E4E4E4; /* Light pagination text color */
}

/* Contact Us Page Styling */
.contact-section {
  width: 100%;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.contact-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 2rem 3rem;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.contact-container h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
  text-align: center;
}

.contact-container p {
  font-size: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #444;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

.form-group textarea {
  resize: none;
}

.btn-submit {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #ccc;
  color: #333;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-submit:hover {
  background: #bbb;
  color: #000;
}

.message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  text-align: center;
}

/*  css for add-btn  */

.add-btn a {
  position: fixed;
  bottom: 6vh;
  right: 5vw;
  z-index: 100;
  background-color: black;
  color: white;
  height: 10vw;
  width: 10vw;
  max-width: 60px;
  max-height: 60px;
  border-radius: 50%;
  font-size: clamp(1rem, 4vw, 2.5rem);
  animation: 3s infinite pulse;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.306);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 50px transparent;
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 transparent;
  }
}


