/* Reset and Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lato", sans-serif;
  background-color: #0d0d0d;
  color: #f5f5f5;
  line-height: 1.6;
  position: relative;
}

/* Fixed Background Texture using comp.jpg */
.background-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("Media/comp.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.06;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 4vh;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.8) 80%,
    rgba(13, 13, 13, 1) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px;
  max-width: 900px;
  animation: fadeInUp 1.5s ease-out;
}

.cross-icon {
  font-size: 3rem;
  color: #d4af37;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(212, 175, 55, 0.3);
}

.in-loving-memory {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #b0b0b0;
  margin-bottom: 15px;
}

.hero-content h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 25px;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Decorative Divider */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 35px;
}

.divider-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, #d4af37, transparent);
}

.divider-icon {
  color: #d4af37;
  font-size: 1.5rem;
}

/* Live Stream Button */
.livestream-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #b8860b 0%, #8b6914 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 18px 45px;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 50px;
  transition: all 0.4s ease;
  box-shadow: 0 4px 25px rgba(184, 134, 11, 0.4);
  margin-bottom: 25px;
}

.livestream-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(184, 134, 11, 0.6);
  background: linear-gradient(135deg, #d4a017 0%, #a67c00 100%);
}

.livestream-btn .play-icon {
  width: 20px;
  height: 20px;
}

.church-name {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-style: italic;
  color: #909090;
  letter-spacing: 2px;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  cursor: pointer;
  animation: pulse 2s infinite;
}

.scroll-indicator span {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.scroll-arrow {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 25px;
  margin: 0 auto;
  position: relative;
}

.scroll-arrow::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Combined Scripture and Memorial Section */
.combined-memorial-section {
  background: #ffffff;
  padding: 40px 0 0;
  width: 100%;
  text-align: center;
  position: relative;
}

.scripture-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.combined-memorial-section .scripture-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.combined-memorial-section .scripture-text {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-style: italic;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.8;
  margin-bottom: 25px;
}

.combined-memorial-section .scripture-ref {
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-style: normal;
  color: #b8860b;
  letter-spacing: 2px;
}

.memorial-image-full {
  width: 100%;
  line-height: 0;
}

.memorial-image-full .memorial-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
  border: none;
}



/* Gallery Section */
.gallery-section {
  padding: 100px 0;
  background: linear-gradient(to bottom, #141414 0%, #1a1a1a 100%);
}

.gallery-section h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  text-align: center;
  color: #d4af37;
  margin-bottom: 15px;
}

.gallery-subtitle {
  text-align: center;
  color: #808080;
  font-size: 1rem;
  margin-bottom: 50px;
  letter-spacing: 1px;
}

/* CSS Masonry Gallery */
.masonry-gallery {
  columns: 4;
  column-gap: 16px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.masonry-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(0, 0, 0, 0.5) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.masonry-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.masonry-item:hover::before {
  opacity: 1;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.03);
}

/* Responsive Masonry */
@media (max-width: 1200px) {
  .masonry-gallery {
    columns: 3;
  }
}

@media (max-width: 768px) {
  .masonry-gallery {
    columns: 2;
    column-gap: 10px;
  }
  .masonry-item {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .masonry-gallery {
    columns: 2;
    column-gap: 8px;
  }
  .masonry-item {
    margin-bottom: 8px;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.97);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
  z-index: 10;
}

.lightbox-counter {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 2px;
}

.lightbox-controls {
  display: flex;
  gap: 10px;
}

.lightbox-btn {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.lightbox-btn svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

.lightbox-btn:hover {
  background: rgba(212, 175, 55, 0.3);
}

.lightbox-btn:hover svg {
  fill: #d4af37;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.3s ease;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.lightbox-nav svg {
  width: 28px;
  height: 28px;
  fill: #ffffff;
}

.lightbox-nav:hover {
  background: rgba(212, 175, 55, 0.3);
}

.lightbox-nav:hover svg {
  fill: #d4af37;
}

.lightbox-prev {
  left: 25px;
}

.lightbox-next {
  right: 25px;
}

/* Progress Bar for Autoplay */
.lightbox-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(to right, #d4af37, #f4d03f);
  z-index: 10;
}

.lightbox-progress.active {
  width: 100%;
}

@keyframes progress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Footer */
footer {
  text-align: center;
  padding: 80px 20px;
  background: #0d0d0d;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-cross {
  font-size: 2.5rem;
  color: #d4af37;
  margin-bottom: 20px;
  opacity: 0.8;
}

.footer-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-style: italic;
  color: #e0e0e0;
  margin-bottom: 25px;
}

.footer-scripture {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-style: italic;
  color: #808080;
  margin-bottom: 10px;
}

.footer-scripture-ref {
  font-size: 0.9rem;
  color: #606060;
  letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    min-height: 100vh;
  }

  .cross-icon {
    font-size: 2.5rem;
  }

  .in-loving-memory {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }

  .livestream-btn {
    padding: 16px 35px;
    font-size: 1rem;
  }

  .scripture-section {
    padding: 60px 0;
  }

  .scripture-card {
    padding: 40px 25px;
    margin: 0 15px;
  }

  .memorial-section {
    padding: 50px 0 70px;
  }

  .gallery-section {
    padding: 60px 0;
  }

  .gallery-section h2 {
    margin-bottom: 10px;
  }

  .gallery-subtitle {
    margin-bottom: 30px;
  }

  .lightbox-nav {
    width: 45px;
    height: 45px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-header {
    padding: 15px 15px;
  }

  footer {
    padding: 60px 20px;
  }

  .footer-text {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .scroll-indicator {
    display: none;
  }

  .divider-line {
    width: 50px;
  }
}

/* Image Loading States */
.masonry-item img {
  background: #1a1a1a;
}

/* Selection Color */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #ffffff;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}
