body, html {
    background: linear-gradient(to top, #f5f5f5, #dcdcdc, #c7c7c7, #a8a8a8);
    background-attachment: fixed; /* Keeps the gradient in place while scrolling */
    background-size: cover;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #212529;
    margin-bottom: 20px;
}

p {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size:  18px;
    color: #555;
}

h1 {
    font-size: 2.5rem;
    color: #212529;
}

/* Fixed Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/1600x900/?dental') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

/* Sections */
section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Automatically adjusts columns */
    gap: 1rem;
    padding: 1rem;

    background: rgba(255, 255, 255, 0.9); /* Slight transparency for content contrast */
    border-radius: 10px;
    margin: 20px auto;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 100%; /* Or any width you prefer */
    max-width: 1200px;
    scroll-margin-top: 80px;
}

.section-content {
    text-align: center;
    justify-content: center;
    align-items: center;
    max-width: 800px;
}

/* Grayscale Gradients for Sections */
#home {
    padding-top: 80px; /* Adjust this value to match the navbar height */
    background: linear-gradient(135deg, #f7f7f7, #e0e0e0);
    height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0; /* Ensure no additional margin */
}

/* Gradient backgrounds */
#services {
    background: linear-gradient(135deg, #e0e0e0, #d6d6d6); /* Light gray to medium gray */
    display: flex;
    align-items: center;
    justify-content: center;
}

#beforeAfter {
    background: linear-gradient(135deg, #d6d6d6, #c7c7c7); /* Match the ending color of #services */
    display: flex;
    align-items: center;
    justify-content: center;
}

#staff {
    background: linear-gradient(135deg, #c7c7c7, #b8b8b8); /* Match the ending color of #beforeAfter */
    display: flex;
    align-items: center;
    justify-content: center;
}

#findus {
    background: linear-gradient(135deg, #b8b8b8, #a8a8a8);
    display: flex;
    align-items: center;
    justify-content: center;
}

#insurances {
    background: linear-gradient(135deg, #a8a8a8, #9b9b9b);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.service-item {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.service-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

button, .btn-primary {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

button:hover, .btn-primary:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px);
}

img {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}

img:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}


iframe {
    width: 100%;
    height: 500px;
    border: 0;
    border-radius: 12px;
}

.navbar .nav-link.active {
    font-weight: bold;
    color: #007bff !important;
}

.navbar-brand {
    font-size: 1.5rem; /* Default size */
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
}

.navbar-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.navbar-visible {
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.navbar-fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.staff-image-placeholder {
    max-width: 100%; /* Ensure the container doesn't exceed the section width */
    display: flex; /* Use flexbox for alignment */
    justify-content: center; /* Center the image horizontally */
    align-items: center; /* Center the image vertically */
    margin: 0 auto; /* Center the container itself */
}

.staff-image-placeholder img {
    max-width: 100%; /* Ensure the image scales correctly */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Ensure the image fills the container proportionally */
    border-radius: 8px; /* Add rounded corners */
    display: block; /* Prevent inline spacing issues */
}


.contact-info {
    margin-top: 30px;
    text-align: center;
}

.contact-info h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-info p {
    margin: 0;
    font-size: 20px;
}

.insurance-images {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.insurance-images img {
    background-color: white;
    max-height: 90px;
    width: auto;
    max-width: 135px;
    object-fit: contain;
}

.navbar .nav-link {
    transition: color 0.3s, text-shadow 0.3s;
}

.navbar .nav-link:hover {
    color: #007bff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar {
    background: rgba(255, 255, 255, 0.9); /* Matches sections' backgrounds */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

footer {
    background: #f5f5f5; /* Lightest shade of the gradient */
    color: #333; /* White foreground color for contrast */
    padding: 20px;
    text-align: center;
}

footer a {
    color: #007bff; /* Standard link color */
    text-decoration: none;
    text-align: center;
}

footer a:hover {
    text-decoration: underline;
    color: #4323e0;
}

.service-item:hover h3 {
    color: #007bff;
}

.gallery-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    overflow: hidden; /* Hide scrollbars */
    position: relative;
    width: 100%;
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto; /* Center the gallery */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.gallery {
    display: flex; /* Horizontal layout */
    gap: 20px; /* Space between images */
    animation: scroll-gallery 30s linear infinite; /* Smooth scrolling animation */
}

.gallery img {
    max-width: 100%; /* Ensure the image fits the container */
    height: auto;    /* Maintain aspect ratio */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    object-fit: cover; /* Crop the image to fit the container */
}

.gallery-container {
    max-width: 100%;
    overflow: hidden;
    position: relative;
  }
  
  .secondary-phone {
    display: block; /* Forces it onto a new line */
    margin-left: 83px; /* Adjust spacing to align with "Phone:" */
}


/* Keyframes for horizontal scrolling */
@keyframes scroll-gallery {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-400%);
    }
}
/* Ensure infinite scroll by duplicating content */
.gallery::after {
    content: '';
    display: inline-block;
    width: 100%;
}

#beforeAfter h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #333; /* Text color for readability */
    margin-bottom: 30px;
    text-align: center;
}
/* Styling for Images */
#beforeAfter img {
    max-width: 45%; /* Ensure images stay proportional */
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px; /* Consistent rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

#beforeAfter img:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}


@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1.2rem; /* Reduce title font size for small screens */
    }
    
    .navbar {
        padding: 0.5rem 1rem; /* Adjust padding to reduce vertical space */
    }
    
    .navbar .nav-link {
        font-size: 0.9rem; /* Slightly smaller font size for links */
    }
}

/* For small devices (iPhone 11, iPhone 13, etc.) */
@media (min-width: 481px) and (max-width: 767px) {
    .navbar-brand {
        font-size: 1.3rem; /* Slightly larger title font */
    }

    .navbar {
        padding: 0.75rem 1.5rem; /* Adjust padding for balance */
    }

    .navbar .nav-link {
        font-size: 1rem; /* Default link font */
    }
}

/* For medium devices (Tablets, small desktops) */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-brand {
        font-size: 1.5rem; /* Maintain default size */
    }

    .navbar {
        padding: 1rem 2rem; /* Balanced padding for larger screens */
    }

    .navbar .nav-link {
        font-size: 1.1rem; /* Slightly larger link font for readability */
    }
}

/* For large devices (Desktops, larger tablets in landscape) */
@media (min-width: 1025px) {
    .navbar-brand {
        font-size: 1.7rem; /* Larger title font for larger screens */
    }

    .navbar {
        padding: 1.2rem 3rem; /* Spacious padding for desktop use */
    }

    .navbar .nav-link {
        font-size: 1.2rem; /* Larger link font for better visibility */
    }
}

@media (min-with: 1920pc) {
    /* For extra-large devices (4K monitors, 5K monitors, etc.) */
   .navbar-brand {
    font-size: 2rem; /* Increase title font size for extra-large screens */
    }

   .navbar {
    padding: 1.5rem 4rem; /* Increase padding for extra-large screens */
    }

   .navbar .nav-link {
    font-size: 1.3rem; /* Increase link font size for even larger screens */
    }
    
}