/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Delius&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Combo&display=swap');

/* General Body Styling */
body {
  margin: 0;
  font-family: 'Georgia', serif;
  background-image: url('backgrounddentistry.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center center;
  color: #333;
  text-align: left;
  line-height: 1.8;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Header Section */
header {
  background-color: #ffffff; /* White background for a clean header */
  color: #000; /* Black text for contrast */
  padding: 20px 0;
  text-align: center;
  font-size: 2.5rem; /* Large font size for the header */
  font-weight: 700; /* Bold for emphasis */
  font-family: 'Delius', cursive; /* Apply Delius font for a unique look */
  border-bottom: 1px solid #ddd; /* Subtle border for separation */
  text-transform: uppercase; /* Uppercase for a classic look */
}

/* Title Styling */
.title {
  font-family: 'Delius', cursive; /* Apply Delius font for the title */
  font-size: 4rem; /* Large font size for emphasis */
  font-weight: 700; /* Bold for prominence */
  text-align: center;
  margin: 20px 0;
  color: #000; /* Black text for the title */
}

/* Navigation Links */
nav {
  background-color: #f8f8f8; /* Light gray background for navigation */
  padding: 10px 0;
  display: flex;
  justify-content: center;
  gap: 30px; /* Space between navigation links */
  border-bottom: 1px solid #ddd; /* Subtle border for separation */
}

nav a {
  text-decoration: none;
  color: #000; /* Black text for contrast */
  font-size: 1.2rem; /* Slightly larger font size */
  font-weight: 500; /* Medium weight for balance */
  font-family: 'Combo', cursive; /* Apply Combo font for navigation */
  text-transform: uppercase; /* Uppercase for a classic look */
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff5188; /* Blue accent color on hover */
}

/* Main Content Section */
main {
  padding: 20px;
  font-family: 'Georgia', serif; /* Classic serif font for body text */
}

main h2 {
  font-size: 2.5rem; /* Section headings */
  font-weight: 700;
  margin-bottom: 20px;
  font-family: 'Delius', cursive; /* Apply Delius font for headlines */
  border-bottom: 2px solid #ddd; /* Underline for section headings */
  padding-bottom: 10px;
}

main p {
  margin-bottom: 20px;
  font-size: 1.1rem; /* Slightly larger font size for readability */
}

/* Image Container */
.image-container img {
  max-width: 100%; /* Adjust the width to 50% of the container */
  height: auto; /* Maintain the aspect ratio */
  display: block; /* Center the image */
  margin: 20px auto; /* Add spacing and center the image */
}

.image-caption {
  text-align: center; /* Center the caption text */
  font-size: 0.9rem; /* Slightly smaller font size for the caption */
  color: #555; /* Subtle gray color for the caption */
  margin-top: 10px; /* Add spacing above the caption */
}

/* Sidebar Section */
.sidebar {
  background-color: #f8f8f8; /* Light gray background for sidebar */
  padding: 20px;
  margin-top: 20px;
  border-left: 3px solid #ddd; /* Left border for emphasis */
}

.sidebar h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  font-family: 'Delius', cursive; /* Apply Delius font for sidebar headings */
}

/* Footer Section */
footer {
  background-color: #f8f8f8; /* Light gray background for footer */
  color: #333; /* Dark gray text for contrast */
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
  border-top: 1px solid #ddd; /* Subtle border for separation */
  font-family: 'Combo', cursive; /* Apply Combo font for footer */
}

/* Buttons */
button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background-color: #000; /* Black background for buttons */
  border: none;
  cursor: pointer;
  font-family: 'Combo', cursive; /* Apply Combo font for buttons */
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #ff5188; /* Blue accent color on hover */
}

/* Gallery Section */
.gallery {
  margin-top: 40px;
}

.gallery h3 {
  text-align: center;
  font-family: 'Delius', cursive; /* Match the font style */
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive grid */
  gap: 20px;
  justify-items: center;
}

.gallery-container img {
  max-width: 100%;
  height: auto;
  border: 2px solid #ddd; /* Add a border around images */
  border-radius: 5px; /* Slightly rounded corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-container img:hover {
  transform: scale(1.05); /* Slight zoom effect on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

.gallery-item {
  text-align: center; /* Center the image and caption */
}

.gallery-item img {
  max-width: 100%;
  height: auto;
  border: 2px solid #ddd; /* Add a border around images */
  border-radius: 5px; /* Slightly rounded corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05); /* Slight zoom effect on hover */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add shadow on hover */
}

.image-caption {
  font-size: 0.9rem; /* Slightly smaller font size for captions */
  color: #555; /* Subtle gray color for captions */
  margin-top: 10px; /* Add spacing above the caption */
}

.gallery-item a {
  text-decoration: none; /* Remove underline from links */
  color: inherit; /* Inherit text color */
}

.gallery-item a:hover .image-caption {
  text-decoration: underline; /* Underline caption on hover */
}

/* Details Container */
.details-container {
  display: flex;
  align-items: flex-start; /* Align items to the top */
  gap: 30px; /* Space between the image and text */
  margin-top: 20px;
}

.image-container img {
  max-width: 400px; /* Set a fixed width for the product image */
  height: auto; /* Maintain aspect ratio */
  border-radius: 5px; /* Optional: Add rounded corners */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

.text-container {
  flex: 1; /* Allow the text to take up remaining space */
}

.text-container p {
  font-size: 1.6rem; /* Increase font size for better readability */
  line-height: 1.8; /* Adjust line height for better spacing */
  color: #000000; /* Subtle gray for the text */
  margin-bottom: 20px;
}

.text-container p strong {
  font-weight: bold;
}

.back-button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #000000; /* Black background for the button */
  text-decoration: none; /* Remove underline */
  border-radius: 5px; /* Rounded corners */
  transition: background-color 0.3s ease;
  margin-top: 10px; /* Add spacing between buttons */
}

.back-button:hover {
  background-color: #ff5188; /* Blue background on hover */
}

.amazon-button {
  display: inline-block;
  margin-bottom: 10px; /* Add spacing between the Amazon button and the Back button */
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #000000; /* Amazon's orange color */
  text-decoration: none; /* Remove underline */
  border-radius: 5px; /* Rounded corners */
  transition: background-color 0.3s ease;
}

.amazon-button:hover {
  background-color: #ff9900; /* Darker orange on hover */
}
/* Amazon Button Styling */
.amazon-button {
  display: inline-block;
  margin-bottom: 10px; /* Add spacing between the Amazon button and the Back button */
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #000000; /* Amazon's orange color */
  text-decoration: none; /* Remove underline */
  border-radius: 5px; /* Rounded corners */
  transition: background-color 0.3s ease;
}

.amazon-button:hover {
  background-color: #cc7a00; /* Darker orange on hover */
}

/* Back Button Styling */
.back-button {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #000; /* Black background for the button */
  text-decoration: none; /* Remove underline */
  border-radius: 5px; /* Rounded corners */
  transition: background-color 0.3s ease;
}

.back-button:hover {
  background-color: #ff5188; /* Blue background on hover */
}

/* Carousel Styling */
.carousel {
  position: relative;
  margin: 20px auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 420px; /* Set a fixed width for smooth sliding */
  height: 320px; /* Set a fixed height for smooth sliding */
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: width 0.3s, height 0.3s;
}

.carousel-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-images img {
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  height: 300px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 1;
  pointer-events: none;
}

.carousel-images img.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
  transform: translateX(0);
}

.carousel-images img.slide-left {
  opacity: 1;
  z-index: 2;
  transform: translateX(-100%);
  transition: transform 0.4s, opacity 0.4s;
}

.carousel-images img.slide-right {
  opacity: 1;
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.4s, opacity 0.4s;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.carousel button:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel .prev {
  left: 10px;
}

.carousel .next {
  right: 10px;
}
/* Center section titles and descriptions */
.accomplishments-section h2,
.accomplishments-section .accomplishment p {
  text-align: center;
}

h2, .accomplishment p {
  text-align: center;
}

.centered-text {
  text-align: center;
}

main h3 {
  text-align: center;
}

.details-container {
  display: flex;
  align-items: center;      /* Center vertically */
  justify-content: center;  /* Center horizontally */
  gap: 30px;
  margin-top: 20px;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 images per row */
  gap: 20px;
  justify-items: center;
}

.details-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  margin-top: 20px;
}

.image-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* This centers the image and button horizontally */
}

.image-container img {
  display: block;
  margin: 0 auto;
}
  
/* Responsive Design for Tablets */
@media (max-width: 900px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .details-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .carousel {
    width: 95vw;
    height: 60vw;
    min-height: 180px;
    max-width: 100vw;
  }
  .carousel-images img {
    width: 90vw !important;
    height: auto !important;
    max-width: 100%;
  }
}

/* Responsive Design for Phones */
@media (max-width: 600px) {
  .gallery-container {
    grid-template-columns: 1fr;
  }
  .details-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
  header .title {
    font-size: 2.2rem;
  }
  main h2 {
    font-size: 1.5rem;
  }
  .image-container img,
  .gallery-item img {
    max-width: 95vw;
    height: auto;
  }
  .carousel {
    width: 98vw;
    height: 60vw;
    min-height: 140px;
    max-width: 100vw;
  }
  .carousel-images img {
    width: 95vw !important;
    height: auto !important;
    max-width: 100%;
  }
  nav {
    flex-direction: column;
    gap: 10px;
    font-size: 1rem;
  }
  .back-button, .amazon-button {
    width: 90vw;
    max-width: 300px;
    font-size: 1rem;
  }
  main {
    padding: 10px;
  }
/* Fix carousel image cut-off on small screens */
.carousel {
  width: 420px;
  height: 320px;
  max-width: 100vw;
  max-height: 70vw;
}

@media (max-width: 900px) {
  .carousel {
    width: 95vw;
    height: auto;
    min-height: unset;
    max-width: 100vw;
    max-height: 70vw;
  }
}

@media (max-width: 600px) {
  .carousel {
    width: 100vw;
    height: auto;
    min-height: unset;
    max-width: 100vw;
    max-height: none;
    padding: 0;
  }
  .carousel-images img {
    position: static;
    width: 100%;
    height: auto;
    max-width: 100vw;
    max-height: 60vw;
    object-fit: contain;
    display: none;
    margin: 0 auto;
  }
  .carousel-images img.active {
    display: block;
    opacity: 1;
    transform: none;
    position: static;
  }
}

html, body {
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
.carousel,
.gallery-container,
.details-container,
main {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 600px) {
  .carousel {
    width: 100%;
    max-width: 100%;
  }
  .carousel-images img {
    max-width: 100%;
  }
  
  
.gallery-item img,
.image-container img {
  max-width: 60%;
  height: auto;
}
