body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  color: #333;
  overflow-x: hidden;
}

.header {
  background-color: #f9f9f9;
  color: #333;
  padding: 20px 0;
  text-align: center;
  border-bottom: 2px solid #0c7a7a;
}

.header .logo-container {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 50px;
  display: inline-block;
}

.header .logo {
  max-width: 180px;
}

h1,
h2 {
  font-family: 'Poppins', sans-serif;
  margin: 20px 0 10px;
  color: #0c7a7a;
}

.main-content .intro {
  text-align: center;
  padding: 30px 0;
  background-color: #f4f4f9;
}

.templates {
  padding: 40px 20px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  row-gap: 50px;
  overflow: hidden;
}

.template-card {
  background: #fff;
  border: 2px solid #f47b46;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 13px;
  max-width: 400px;
  position: relative;

}


.template-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #f47b46;
  /* لون الهوية */
  color: white;
  padding: 5px 10px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 5px;
  z-index: 1;
}

.template-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.template-card img {
  width: 100%;
  height: auto;
  display: block;
}

.template-card h3 {
  color: #0c7a7a;
  margin: 15px 0 5px;
}

.template-card p {
  padding: 0 15px;
  color: #555;
}

.template-card .btn {
  margin: 15px 0 20px;
  background: #f47b46;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.template-card .btn:hover {
  background: #0c7a7a;
}

.footer {
  background-color: #0c7a7a;
  color: #fff;
  text-align: center;
  padding-top: 60px;
  font-size: 14px;
  margin-top: 50px;
}

.footer a {
  color: #f47b46;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.button-container {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

.btn {
  background-color: #f47b46;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.btn:hover {
  background-color: #0c7a7a;
}

.lightbox img {
  max-width: 100%;
  border-radius: 10px;
  margin: 0 auto;
  display: block;
}

.lightbox-title {
  margin-top: 10px;
  text-align: center;
  color: #333;
  font-weight: bold;
  font-size: 16px;
}

@media (max-width: 768px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
    /* Show 2 cards per row on tablets */
  }
}

@media (max-width: 480px) {
  .template-grid {
    grid-template-columns: 1fr;
    /* Show 1 card per row on small screens */
  }
}

p {
  font-size: 16px;
}

ul {
  margin-top: 12px;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.filters label {
  font-weight: bold;
  margin-right: 10px;
  font-size: 20px;
}

.filters select {
  padding: 5px 10px;
  font-size: 23px;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
}

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px;
  }

  .filters label {
    margin: 0;
    font-size: 16px;
  }

  .filters select {
    width: 100%;
    font-size: 18px;
    padding: 8px 12px;
  }
}

.filters select:focus {
  border-color: #0c7a7a;
  box-shadow: 0 0 5px rgba(0, 123, 123, 0.5);
  background-color: #0c7a7a;
}

/* Filter Section Container */
.filter-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  padding: 20px;
  background: #f4f4f9;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  flex-wrap: wrap;
}

/* Filter Group (Label + Dropdown) */
.filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

/* Filter Buttons Section */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 30px auto;
  padding: 10px 20px;
  max-width: 700px;
}

.filter-btn {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  background-color: #f4f4f4;
  border: 2px solid #0c7a7a;
  color: #0c7a7a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: #f47b46;
  color: white;
  border-color: #f47b46;
}

.filter-btn.active {
  background-color: #0c7a7a;
  color: white;
  border-color: #0c7a7a;
}

/* Responsive for Filter Buttons */
@media (max-width: 600px) {
  .filter-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }
}

/* Filter Dropdowns */
.filter-dropdown {
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 2px solid #0c7a7a;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dropdown Focus & Hover */
.filter-dropdown:focus,
.filter-dropdown:hover {
  border-color: #f47b46;
  box-shadow: 0 0 5px rgba(244, 123, 70, 0.5);
}

/* Filter Labels */
.filter-group label {
  font-size: 14px;
  font-weight: bold;
  color: #0c7a7a;
}

.filters label {
  font-weight: bold;
  color: #0c7a7a;
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-section {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .filter-group {
    width: 100%;
  }

  .filter-dropdown {
    width: 100%;
  }
}