/* Modern Root Variables */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --shadow-light: 0 10px 40px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 15px 50px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.2);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Modern Container with Glass Effect */
.container {
  animation: fadeInUp 0.8s ease-out;
}

/* Enhanced Image Circle with Hover Effects */
.img-circle {
  height: 200px;
  width: 200px;
  padding: 0.25rem;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border: 3px solid transparent;
  border-radius: 50%;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.img-circle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--primary-gradient);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: var(--transition-smooth);
}

.img-circle:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: var(--shadow-heavy);
}

.img-circle:hover::before {
  opacity: 1;
}

.img-circle img {
  transition: var(--transition-smooth);
}

.img-circle:hover img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Glassmorphism Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-medium);
  padding: 30px;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

/* Modern Mass Time Table */
#masstime {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

#masstime td,
#masstime th {
  border-width: 0px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

#masstime tr {
  transition: var(--transition-smooth);
}

#masstime tr:hover td {
  background: var(--primary-gradient);
  color: white;
  transform: scale(1.02);
  box-shadow: var(--shadow-light);
}

#masstime td:first-child {
  border-radius: 10px 0 0 10px;
}

#masstime td:last-child {
  border-radius: 0 10px 10px 0;
  font-weight: 600;
}

/* Animated Heading */
#masshead {
  margin: 20px auto;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  position: relative;
  display: block;
  text-align: center;
  width: 100%;
}

#masshead::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  animation: expandWidth 2s ease-in-out infinite;
}

/* Enhanced Image Hover Effects */
.img-fluid {
  transition: var(--transition-smooth);
  border-radius: 15px;
  box-shadow: var(--shadow-light);
}

.img-fluid:hover {
  transform: scale(1.03) translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

/* Modern Section Headings */
.section-heading {
  position: relative;
  padding-bottom: 20px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

.section-heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

/* Enhanced Card Titles */
.card-title {
  transition: var(--transition-smooth);
  position: relative;
  display: inline-block;
}

.card-title::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--secondary-gradient);
  transition: var(--transition-smooth);
}

.card-title:hover::before {
  width: 100%;
}

/* Animated Scroll Text */
.scroll-text {
  position: relative;
  animation: scrollanim 5s infinite, pulse 2s ease-in-out infinite;
  animation-direction: alternate;
  background: var(--secondary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 1.5rem;
}

/* Modern HR Styles */
hr {
  height: 3px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 2px;
  opacity: 0.3;
  transition: var(--transition-smooth);
}

hr:hover {
  opacity: 1;
  transform: scaleX(1.02);
}

/* Floating Animation for Images */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.col-md-4 .img-fluid {
  animation: float 6s ease-in-out infinite;
}

.col-md-4:nth-child(2) .img-fluid {
  animation-delay: 1s;
}

.col-md-4:nth-child(3) .img-fluid {
  animation-delay: 2s;
}

/* Fixed Height for Top Row Images */
.container > .row:first-of-type .col-md-4 .img-fluid {
  height: 400px;
  object-fit: cover;
  width: 100%;
}

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

/* Gradient Shift Animation */
@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Expand Width Animation */
@keyframes expandWidth {
  0%,
  100% {
    width: 60px;
  }
  50% {
    width: 120px;
  }
}

/* Scroll Animation */
@keyframes scrollanim {
  0% {
    left: 100%;
    transform: translateX(0);
  }
  100% {
    left: 0px;
    transform: translateX(0);
  }
}

/* Enhanced Row Styles */
.row {
  animation: fadeInUp 0.8s ease-out;
}

.row:nth-child(2) {
  animation-delay: 0.2s;
}

.row:nth-child(3) {
  animation-delay: 0.4s;
}

/* Modern Button Styles */
.btn {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  border-radius: 25px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-light);
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

/* Carousel Enhancements */
#churchcarousel {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
}

#churchcarousel:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-heavy);
}

#churchcarousel img {
  transition: var(--transition-smooth);
}

#churchcarousel:hover img {
  transform: scale(1.05);
}

/* Text Styling */
.dark-grey-text {
  line-height: 1.8;
  letter-spacing: 0.3px;
}

/* Trustee Images */
.trustImg {
  transition: var(--transition-bounce);
  cursor: pointer;
}

.trustImg:hover {
  transform: translateY(-15px) rotate(5deg);
}

/* Section Spacing */
.scrollMar {
  padding: 60px 0;
  animation: fadeInUp 1s ease-out;
}

/* Responsive Design */
@media only screen and (max-width: 667px) {
  #masstime {
    width: 100%;
  }

  .h1.section-heading {
    font-size: 30px;
  }

  #frname {
    margin: 5px 0 !important;
  }

  .img-circle {
    height: 150px;
    width: 150px;
  }

  .glass-card {
    padding: 20px;
  }

  .btn {
    font-size: 14px;
    padding: 8px 20px;
  }

  .container > .row:first-of-type .col-md-4 .img-fluid {
    height: 250px;
  }
}

/* Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Accessibility Focus Styles */
*:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* Selection Styling */
::selection {
  background: rgba(102, 126, 234, 0.3);
  color: inherit;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Mouse Trail Effect */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  animation: fadeOut 0.8s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Custom Cursor */
* {
  cursor: none !important;
}

.custom-cursor {
  position: fixed;
  width: 30px;
  height: 30px;
  border: 2px solid #667eea;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease;
  mix-blend-mode: difference;
}

.custom-cursor::before {
  content: "✟";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  color: #667eea;
  font-weight: bold;
}

.custom-cursor.hover {
  transform: scale(1.8);
  background: rgba(102, 126, 234, 0.2);
}

.custom-cursor.hover::before {
  color: #764ba2;
}
