
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --main-bg-color: #faf9ee;
  --brown-color: rgb(85, 0, 0);
  --buttonbg: #dccfc0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  background-color: var(--main-bg-color);
  max-width: 100%;
  margin: 0 auto;
  padding: 20px 20px;
}

.gallery-header {
  text-align: center;
  padding: 60px 0 40px;
  background: linear-gradient(
    135deg,
    var(--main-bg-color) 0%,
    var(--brown-color) 30%,
    var(--brown-color) 80%
  );
  color: white;
  margin-bottom: 40px;
  border-radius: 0 0 20px 20px;
}

.gallery-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.gallery-main {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding-bottom: 60px;
  background-color: var(--brown-color);
}

.topic-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e1e5e9;
}

.topic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.topic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px;
  background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
  border-bottom: 1px solid #e1e5e9;
}

.topic-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.topic-info p {
  color: #6b7280;
  font-size: 0.95rem;
}

.toggle-btn {
  width: auto;
  height: auto;
  padding: 3px;
  border: none;
  background: rgb(255, 123, 0);
  color: white;
  cursor: pointer;
  display: flex;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.plus-icon {
  margin: 5px;
  font-size: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.slider-container {
  position: relative;
  padding: 30px;
  background: #fafbfc;
}

.image-slider {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #2563eb;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.nav-btn:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.slide-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .gallery-header {
    padding: 40px 0 30px;
    margin-bottom: 25px;
  }

  .gallery-header h1 {
    font-size: 2.2rem;
  }

  .gallery-header p {
    font-size: 1rem;
  }

  .topic-header {
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .topic-info h3 {
    font-size: 1.3rem;
  }

  .image-slider {
    height: 280px;
  }

  .slider-container {
    padding: 20px;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .prev-btn {
    left: 15px;
  }

  .next-btn {
    right: 15px;
  }
}

@media (max-width: 480px) {
  .gallery-header h1 {
    font-size: 1.8rem;
  }

  .topic-header {
    padding: 15px;
  }

  .image-slider {
    height: 220px;
  }

  .slider-container {
    padding: 15px;
  }

  .toggle-btn {
    width: auto;
    height: auto;
  }

  .plus-icon {
    font-size: 13px;
  }

  .nav-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }

  .indicator {
    width: 10px;
    height: 10px;
  }
}

/* Loading animation for images */
.slide img {
  transition: opacity 0.3s ease;
}

.slide img:not([src]) {
  opacity: 0;
}

.slide img[src] {
  opacity: 1;
}

.slide img {
  object-fit: contain;
}
