@media (max-width: 768px) {
    /* General Body Adjustments */
    body {
        padding: 10px !important;
    }

    /* Header Styling */
    header {
        padding: 60px 0 !important;
    }

    header h1 {
        font-size: 3rem !important; /* Scale down header font size */
        padding: 0 20px !important;
    }

    header p {
        font-size: 1.5rem !important; /* Scale down subheading font size */
        padding: 0 10px !important;
    }

    /* Journey Button Styling */
    .journey-button {
        padding: 15px 30px !important;
        font-size: 1.5rem !important; /* Smaller font for mobile */
        width: 70% !important; /* Full width for better touch access */
    }

    /* Slideshow Images */
    .bible-image {
        width: 90% !important; /* Scale images to prevent overflow */
        max-width: 100% !important;
        height: auto !important;
        max-height: 80% !important;
    }

    /* Section Adjustments */
    section {
        padding: 30px 10px !important; /* Reduce padding for compact layout */
        font-size: 1rem !important;
    }

    section h2 {
        font-size: 2rem !important; /* Smaller headings for mobile */
        margin-bottom: 10px !important;
    }

    section p {
        font-size: 1.2rem !important; /* Adjust paragraph font size */
        line-height: 1.4 !important;
    }

    /* Survey Button Styling */
    .survey-button {
        padding: 10px 20px !important;
        font-size: 1.2rem !important; /* Smaller font for mobile */
        width: 70% !important; /* Full width */
        margin: 10px 0 !important; /* Add spacing for better touch access */
    }

    /* Footer Adjustments */
    footer {
        padding: 20px 10px !important;
        font-size: 0.9rem !important;
    }

    footer a {
        display: block !important;
        margin: 5px 0 !important; /* Stack links for better readability */
    }
    
    /* Slideshow container adjustments */
    .slideshow-container {
        height: 50vh !important; /* Set height relative to viewport for better fit on mobile */
    }

    /* Bubble container styling for mobile */
    .bubble-container {
        display: none !important; /* Hide bubbles on mobile for better performance */
    }
}

/* Slideshow Container */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    overflow: hidden;
}

/* Bible Images */
.bible-image {
    position: absolute;
    width: 95%;  /* Adjust this to match the desired size */
    max-width: 100%;
    height: auto;
    max-height: 90%;  /* Adjust height accordingly */
    object-fit: cover;
    opacity: 0;  /* Initially hidden */
    transition: opacity 0.5s ease-in-out;  /* Smooth fade-in and fade-out */
    border-radius: 20px;  /* Rounds the corners */
    box-shadow: 0px 0px 30px 20px rgba(0, 0, 0, 0.8);  /* Fades the edges into the background */
}

@keyframes fade {
    0% { opacity: 0; }
    10% { opacity: 0.9; }  /* Fade in to slightly faded opacity */
    40% { opacity: 0.9; }  /* Stay slightly faded */
    60% { opacity: 0.9; }  /* Stay slightly faded for longer */
    90% { opacity: 0; }    /* Start fading out */
    100% { opacity: 0; }   /* Fully faded out */
}

/* Base button styling (same as before) */
.journey-button {
    background: linear-gradient(45deg, #FFD700, #FF8C00, #FF4500, #FFD700);
    background-size: 400% 400%;
    color: white;
    padding: 20px 40px;
    font-size: 2rem;
    font-family: 'Lora', serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 
                0 0 40px rgba(255, 140, 0, 0.5), 
                0 0 60px rgba(255, 69, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: gradient-shift 3s ease-in-out infinite, glow-pulse 2s infinite ease-in-out;
}

/* Burst Effect styling */
.burst-effect {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    pointer-events: none;
    transform: scale(0);
    opacity: 1;
    animation: burst-animation 1s ease-out forwards;
    z-index: -1;
}

/* Burst animation */
@keyframes burst-animation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Flash effect with faster transition */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.2s ease-in-out;  /* Faster 0.2 second flash */
}

.survey-button {
  background: linear-gradient(45deg, #FFD700, #FFA500);
  color: white;
  padding: 15px 30px;
  font-size: 1.5rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.survey-button:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  background: linear-gradient(45deg, #FFA500, #FF4500);
}

.survey-button:active {
  transform: scale(0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Fade to black effect with a slower and smooth transition */
.fade-to-black {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0;  /* Initially transparent */
    pointer-events: none;
    z-index: 1000;
    transition: opacity 4s ease-in-out;  /* Slow 4 second fade */
}

/* Adjusting header and section colors */
body {
    font-family: 'Lora', serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(120deg, #483D8B, #556B2F);  /* Shifted gradient for balance */
    color: #fff;
}

header {
    background-image: url('ancient-landscape.jpg'); /* Optional Background Image */
    background-size: cover;
    color: white;
    text-align: center;
    padding: 120px 0;
    background-position: center;
    position: relative;
}

/* Header and Overlay */
header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay behind text to improve contrast */
    z-index: 1; /* Ensures the overlay sits behind the text */
}

header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 6rem;
    margin: 0;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 
                 0 0 30px rgba(255, 255, 255, 0.7), 
                 0 0 40px rgba(255, 255, 255, 0.5);
    color: #FFD700; /* Gold color for text */
}

header p {
    font-size: 2rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 
                 0 0 20px rgba(255, 255, 255, 0.6);
    color: #FFFFFF; /* Keep text color white but emphasize the shadow effect */
}

header button {
    margin-top: 30px;
    padding: 20px 40px;
    font-size: 1.8rem;
    cursor: pointer;
    background-color: #FF8C00;
    border: none;
    color: white;
    position: relative;
    z-index: 2;
    border-radius: 12px; /* Smooth edges for the button */
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.7), 
                0px 0px 15px rgba(255, 165, 0, 0.8);
}

/* Section colors */
section {
    padding: 60px 20px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    /* Gradient fade at the top and bottom of the section */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, rgba(255, 255, 255, 0) 100%);
}

section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #FF8C00; /* Orange for headings */
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.2), 0 0 20px rgba(255, 140, 0, 0.6); /* Glow effect */
}

/* Adjust paragraph style */
section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: #D3D3D3;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3), 0 0 10px rgba(255, 255, 255, 0.2);
    line-height: 1.6;  /* Improve readability with better line spacing */
}

footer {
    background-color: #2F4F4F;
    color: white;
    text-align: center;
    padding: 40px 20px;
}

footer a {
    color: #FFD700;
    margin: 0 10px;
    text-decoration: none;
}.journey-button {
  background: linear-gradient(45deg, #FFD700, #FF8C00, #FF4500, #FFD700);  /* Gradient colors */
  background-size: 400% 400%;
  color: white;
  padding: 20px 40px;
  font-size: 2rem;
  font-family: 'Lora', serif;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 
              0 0 40px rgba(255, 140, 0, 0.5), 
              0 0 60px rgba(255, 69, 0, 0.4);
  position: relative;
  overflow: hidden;  /* Prevent burst from leaking out */
  z-index: 1;  /* Keep button content on top */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: gradient-shift 3s ease-in-out infinite, glow-pulse 2s infinite ease-in-out;
}

/* Hover state */
.journey-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.9), 
              0 0 60px rgba(255, 140, 0, 0.7), 
              0 0 80px rgba(255, 69, 0, 0.6);
}

/* Active state (when clicked) */
.journey-button:active {
  transform: scale(0.95);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5), 
              0 4px 30px rgba(255, 140, 0, 0.4);
}

/* Burst Effect using ::after */
.journey-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255, 215, 0, 0.8);  /* Yellow color for the burst */
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  z-index: -1;  /* Keep the burst behind the button */
}

.journey-button:active::after {
  transform: translate(-50%, -50%) scale(20);
  opacity: 0;
}

/* Gradient background animation */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glow pulse animation */
@keyframes glow-pulse {
  0% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 0 0 40px rgba(255, 140, 0, 0.5), 0 0 60px rgba(255, 69, 0, 0.4); }
  50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 50px rgba(255, 140, 0, 0.7), 0 0 70px rgba(255, 69, 0, 0.6); }
  100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.7), 0 0 40px rgba(255, 140, 0, 0.5), 0 0 60px rgba(255, 69, 0, 0.4); }
}

/* Bubble container styling */
.bubble-container {
    position: fixed; /* Fix the container to the screen */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Ensure clicks go through the bubbles */
    z-index: 1000; /* Make sure bubbles are on top */
}

/* Bubble styling for "Begin Your Journey" button */
.journey-bubble {
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: rgba(255, 255, 255, 1); /* Bright white bubbles */
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9), /* Bright outer glow */
                0 0 20px rgba(255, 255, 255, 0.8), 
                0 0 30px rgba(255, 255, 255, 0.7);
    animation: flyUp 2.5s ease-out forwards; /* Use animation for bubbles */
}

/* Adjust the flyUp animation for smoother movement */
@keyframes flyUp {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    80% {
        opacity: 0.8; /* Slow down the fade-out */
    }
    100% {
        transform: translate(0, -200px) scale(1.5); /* Bubbles grow as they fly up */
        opacity: 0;
    }
}