.intro {
  text-align: center;
  padding: 80px 20px;
  background-color: #f5f5f5;
  color: var(--primary-color);
}

.intro h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--secondary-color);
  line-height: 1.3;
}

.intro p {
  font-size: 1.1rem;
  color: #444;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Mobile reordering for hero and intro */
@media (max-width: 600px) {
  .hero {
    display: flex;
    flex-direction: column;
  }
  .hero-content {
    order: -1;
    margin-bottom: 1.5rem;
  }
  .intro {
    width: 100vw;
    margin-top: 0;
  }
}

/* Gallery Section */
.gallery-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(106, 20, 139, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.read-more-btn {
  background: #fff;
  color: var(--secondary-color);
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid #fff;
  transition: all 0.3s ease;
}

.read-more-btn:hover {
  background: transparent;
  color: #fff;
}

.gallery-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-card h3 {
  font-size: 1.2rem;
  margin: 20px 20px 10px;
  color: var(--primary-color);
}

.card-date {
  font-size: 0.9rem;
  color: #888;
  margin: 0 20px;
  display: block;
}

.gallery-card p {
  font-size: 1rem;
  color: #444;
  margin: 10px 20px 20px;
  line-height: 1.5;
}

/* Section Header with Accent Line */
.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--primary-color);
  font-weight: 700;
}

.accent-line {
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  margin: 12px auto 0;
  border-radius: 4px;
}
/* Typing animation for intro heading */
.typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 0.15em solid var(--secondary-color);
  width: 32ch;
  animation: typing 4s steps(32, end), blink 0.75s step-end infinite;
}

/* Keyframes */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 32ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Mobile view fix */
@media (max-width: 600px) {
  .typing {
    font-size: 4vw; /* optional: scale text */
    width: 32ch;
    animation: typingMobile 4s steps(32, end), blink 0.75s step-end infinite;
    border-right: 0.15em solid var(--secondary-color);
  }

  @keyframes typingMobile {
    from {
      width: 0;
    }
    to {
      width: 32ch;
    }
  }
}

/* Gallery Modal Styles */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.gallery-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-modal-content {
  background: #fff;
  border-radius: 15px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideIn 0.4s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gallery-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  z-index: 1001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
}

.gallery-modal-close:hover {
  background: var(--secondary-color);
  color: #fff;
  transform: rotate(90deg);
}

.gallery-modal-body {
  display: flex;
  flex-direction: column;
}

.gallery-modal-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}

.gallery-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-modal-content-text {
  padding: 30px;
}

.gallery-modal-content-text h3 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-weight: 700;
}

.modal-date {
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin-bottom: 20px;
}

.modal-description {
  line-height: 1.7;
  color: #444;
}

.modal-description p {
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.modal-description ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.modal-description li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 1rem;
  color: #555;
}

.modal-description li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile Responsive Modal */
@media (max-width: 768px) {
  .gallery-modal-content {
    margin: 10px;
    max-height: 95vh;
  }
  
  .gallery-modal-image {
    height: 250px;
  }
  
  .gallery-modal-content-text {
    padding: 20px;
  }
  
  .gallery-modal-content-text h3 {
    font-size: 1.5rem;
  }
  
  .modal-description p {
    font-size: 1rem;
  }
  
  .gallery-modal-body {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .gallery-modal-content {
    margin: 5px;
    border-radius: 10px;
  }
  
  .gallery-modal-image {
    height: 200px;
    border-radius: 10px 10px 0 0;
  }
  
  .gallery-modal-content-text {
    padding: 15px;
  }
  
  .gallery-modal-content-text h3 {
    font-size: 1.3rem;
  }
  
  .modal-description p {
    font-size: 0.95rem;
  }
}
