/* Global Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f3fdf7;
  color: #1c3c24;
  overflow-x: hidden;
}

section {
  margin-bottom: 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 25px;
  color: #2e7d32;
  font-size: 1.8rem;
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, #a5d6a7, #2e7d32);
  border-radius: 2px;
}

/* Top Section */
.top-section {
  background: url('img/bg1.jpg') no-repeat center;
  background-size: cover;
  padding: 30px;
  text-align: center;
  color: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.top-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.top-section > * {
  position: relative;
  z-index: 2;
}

#time {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

#gregorian-date, #hijri-date, #day {
  font-size: 1.3rem;
  margin: 8px 0;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Weather Section */
#weather-location {
  margin-top: 15px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 50px;
  display: inline-block;
  backdrop-filter: blur(5px);
}

#location, #weather {
  font-size: 1.2rem;
  margin: 5px 0;
}

/* Prayer Section */
.prayer-section {
  background-color: #eafaf1;
  padding: 30px 20px;
  border-radius: 15px;
  max-width: 700px;
  margin: 40px auto;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  font-family: 'Segoe UI', sans-serif;
  color: #14532d;
  transition: transform 0.3s ease;
}

.prayer-section:hover {
  transform: translateY(-5px);
}

.prayer-box h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #2e7d32;
}

/* Prayer List Style */
.prayer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prayer-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin-bottom: 12px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,128,0,0.05);
  border-left: 5px solid #c6e8d3;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Hover effect */
.prayer-list li:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0,128,0,0.1);
}

/* Current prayer highlight */
.prayer-list li.current-prayer {
  background-color: #dbf3e2;
  border-left-color: #2e7d32;
  box-shadow: 0 5px 15px rgba(46, 125, 50, 0.2);
  animation: pulseHighlight 2s infinite;
}

/* Current prayer indicator */
.prayer-list li.current-prayer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #2e7d32, #a5d6a7);
  animation: loading 30s linear infinite;
}

/* Completed prayer styling */
.prayer-list li.prayer-completed {
  background-color: #f2f9f4;
  border-left-color: #81c784;
  opacity: 0.85;
}

.prayer-name {
  font-weight: bold;
  font-size: 1.1rem;
  color: #1b5e20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prayer-name i {
  font-size: 1.2rem;
  color: #2e7d32;
}

.prayer-time {
  font-size: 1.1rem;
  color: #2e7d32;
  font-weight: 500;
}

/* Styled Checkbox */
.prayer-checkbox {
  position: relative;
  width: 24px;
  height: 24px;
}

.prayer-check {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.prayer-check-label {
  position: absolute;
  top: 0;
  left: 0;
  height: 24px;
  width: 24px;
  background-color: #ffffff;
  border: 2px solid #2e7d32;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prayer-check:checked + .prayer-check-label {
  background-color: #2e7d32;
}

.prayer-check:checked + .prayer-check-label:after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.prayer-check-label:hover {
  background-color: #e8f5e9;
}

.next-time {
  text-align: center;
  font-weight: bold;
  margin-top: 20px;
  font-size: 1.2rem;
  color: #2e7d32;
  padding: 10px;
  background-color: #ffffff;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0,128,0,0.1);
}

/* Animations */
@keyframes pulseHighlight {
  0% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(46, 125, 50, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, 0); }
}

@keyframes loading {
  0% { width: 0; }
  100% { width: 100%; }
}

/* Tools Section */
.tools-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 30px;
  background-color: #f0fff5;
  border-radius: 15px;
  max-width: 1000px;
  margin: 0 auto;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.tool-box {
  background: linear-gradient(135deg, #a5d6a7, #c8e6c9);
  border-radius: 15px;
  padding: 25px 15px;
  text-align: center;
  color: #1b5e20;
  box-shadow: 0 5px 15px rgba(0, 128, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.tool-box:hover {
  transform: translateY(-8px) scale(1.05);
  background: linear-gradient(135deg, #81c784, #a5d6a7);
  box-shadow: 0 10px 25px rgba(0, 128, 0, 0.15);
}

.tool-box i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #2e7d32;
  transition: transform 0.3s ease;
}

.tool-box:hover i {
  transform: scale(1.2);
}

.tool-box span {
  font-size: 1.1rem;
  font-weight: bold;
  display: block;
}

/* New section: Important Amal */
.amal-section {
  padding: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.amal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.amal-card {
  background-color: #ffffff;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  border-top: 5px solid #a5d6a7;
}

.amal-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  border-top-color: #2e7d32;
}

.amal-card i {
  font-size: 2.5rem;
  color: #2e7d32;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.amal-card:hover i {
  transform: scale(1.2) rotate(5deg);
}

.amal-card h3 {
  color: #1b5e20;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.amal-card p {
  color: #3c6e47;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Gallery Section */
.gallery-section {
  padding: 30px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 250px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  margin: 0 0 15px 0;
  font-size: 1.2rem;
}

.download-btn {
  background-color: #2e7d32;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background-color: #1b5e20;
  transform: scale(1.05);
}

/* Footer */
.footer {
  background-color: #1c3c24;
  color: white;
  padding: 30px 0;
  text-align: center;
  border-radius: 20px 20px 0 0;
  margin-top: 50px;
}

.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer .fa-heart {
  color: #ff4d6d;
  animation: pulse 1.5s infinite;
}

.author-name {
  font-weight: bold;
  color: #a5d6a7;
}

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

.social-link {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: #a5d6a7;
  transform: translateY(-5px);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .top-section {
    padding: 20px;
  }
  
  #time {
    font-size: 3rem;
  }
  
  .tools-section, .amal-grid, .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
  }
  
  .gallery-item {
    height: 200px;
  }
}

/* Transition effects for page elements */
.animate__animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.animate__delay-1 {
  animation-delay: 0.2s;
}

.animate__delay-2 {
  animation-delay: 0.4s;
}

.animate__delay-3 {
  animation-delay: 0.6s;
}

.animate__delay-4 {
  animation-delay: 0.8s;
}