#logo-image {
  max-width: 300px;
  height: 100px;
}

a {
  text-decoration: none;
  color: black;
}

a:hover {
  color: gray;
}

html {
  scroll-behavior: smooth;
}

:root {
  --fluid-min-width: 320;
  --fluid-max-width: 1200;
  --fluid-min-size: 16;
  --fluid-max-size: 18;
  --fluid-min-header: 24;
  --fluid-max-header: 32;

  --fluid-screen: 100vw;
  --fluid-bp: calc(
    (var(--fluid-screen) - var(--fluid-min-width) * 1px) /
      (var(--fluid-max-width) - var(--fluid-min-width))
  );
  --font-serif: "Playfair Display", serif;
  --font-sans: "Inter", sans-serif;
  --color-primary: #1a1a1a;
  --color-accent: #c41e3a;
  --color-light-bg: #f5f5f5;
  --color-border: #e0e0e0;
}

body {
  font-family: var(--font-sans);
  margin: auto;
  padding: 0;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
  background-color: var(--color-light-bg);
  color: var(--color-primary);
  font-size: clamp(
    var(--fluid-min-size) * 1px,
    calc(
      var(--fluid-min-size) * 1px +
        (var(--fluid-max-size) - var(--fluid-min-size)) * var(--fluid-bp)
    ),
    var(--fluid-max-size) * 1px
  );
  margin-left: clamp(100px, 15vw, 200px);
  margin-right: clamp(100px, 15vw, 200px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: clamp(100px, 15vw, 200px);
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
}

body::before {
  left: 0;
  background-image: url("images/Logo side.jpg");
  background-position: left center;
}

body::after {
  right: 0;
  background-image: url("images/Logo side - Copy.jpg");
  background-position: right center;
}

#logo-header {
  background-color: var(--color-light-bg);
  padding: 10px 0;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#information {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  box-sizing: border-box;
}

li {
  list-style-type: none;
  margin: 0;
  padding-bottom: 0;
}

#name {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  width: 100%;
  margin-bottom: 5px;
}

#address {
  font-weight: bold;
  font-size: 0.9rem;
  text-align: center;
  padding: 0;
  margin: 0;
  flex: 0 1 auto;
  min-width: auto;
}

#hours {
  text-align: center;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-width: auto;
  font-size: 0.9rem;
  padding-left: 8px;
  border-left: 1px solid #ddd;
}

#hours p {
  margin: 0 0 3px 0;
  font-weight: 600;
}

#hours ul {
  margin: 0;
  padding: 0;
}

#service-area {
  text-align: center;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  min-width: auto;
  font-size: 0.9rem;
  padding-left: 8px;
  border-left: 1px solid #ddd;
}

#service-area p {
  margin: 0 0 3px 0;
  font-weight: 600;
}

#service-area ul {
  margin: 0;
  padding: 0;
}

#social-media {
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  padding-left: 8px;
  border-left: 1px solid #ddd;
  flex: 0 1 auto;
  min-width: auto;
}

#social-media p {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
}

.social-link {
  display: inline-block;
  margin: 0 12px;
  transition: all 0.3s ease;
  color: var(--color-primary);
}

.social-link:hover {
  transform: scale(1.15);
}

a[href*="facebook"]:hover {
  color: #1877f2;
}

a[href*="instagram"]:hover {
  color: #e4405f;
}

a[href*="linkedin"]:hover {
  color: #0a66c2;
}

#content {
  width: min(90%, calc(100% - 2 * clamp(100px, 15vw, 200px)));
  margin: 20px auto;
  background-color: white;
  height: auto;
  animation-name: fadeIn;
  animation-duration: 1s;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#address,
#hours,
#service-area,
#social-media {
  text-align: left;
  margin-top: 0;
}

#nav-bar {
  width: 80%;
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

nav a {
  margin: 0 15px;
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.2rem;
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  border-bottom: 3px solid transparent;
}

nav a:hover {
  color: white;
  background-color: var(--color-primary);
  border-bottom-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
}

nav a.active {
  color: white;
  background-color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

#gallery-overview {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(10px, 2vw, 20px);
  justify-content: center;
  padding: clamp(0.5rem, 2vw, 1.5rem);
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  border: 1px solid var(--color-border);
}

.gallery-grid img:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

#image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease-in;
}

.modal-content {
  position: relative;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  flex-direction: column;
}

#modal-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--color-accent);
}

.modal-nav {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.modal-prev,
.modal-next {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover {
  background-color: var(--color-primary);
}

figcaption {
  text-align: center;
  font-style: italic;
  margin-top: 8px;
}

#team-photo img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#company-history {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
}

#company-history h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2rem);
}

#our-mission {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
}

#our-mission h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2rem);
}

#our-team {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
}

#our-team h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2rem);
}

#introduction {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
}

#introduction p {
  font-size: clamp(1.2rem, 1rem + 2vw, 1.8rem);
  line-height: 1.6;
}

#services-overview {
  width: min(90%, 300px);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: clamp(1rem, 1rem + 1vw, 1.4rem);
  padding: clamp(0.5rem, 2vw, 1rem);
  font-style: bold;
}
#services-overview h2 {
  text-align: center;
}

#services-overview ul {
  list-style-type: disc;
  padding-left: 75px;
  text-align: left;
}

#why-choose-us {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
}

#why-choose-us p,
h2 {
  font-size: 1.6rem;
}

#intro-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 400px;
  height: auto;
  margin-bottom: 20px;
}

hr {
  width: 80%;
}

#contact {
  width: 80%;
  margin: 0 auto;
  padding: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 20px;
}

.contact-info,
.contact-form {
  background-color: var(--color-light-bg);
  padding: 28px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
}

.contact-info:hover,
.contact-form:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.contact-info h3,
.contact-form h3 {
  margin-bottom: 15px;
  color: black;
}

input,
textarea {
  width: 90%;
  padding: 12px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: #999;
}

input[type="submit"] {
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

input[type="submit"]:hover {
  background-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.25);
}

input[type="submit"]:active {
  transform: translateY(0);
}

.hours-lists {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.day {
  text-align: left;
  padding-right: 8px;
}

.hours {
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  hyphens: auto;
  max-width: 100%;
  box-sizing: border-box;
}

#contact-us h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2rem);
  text-align: center;
}

#contact-us p {
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
  width: 60%;
  margin-left: auto;
  margin-right: auto;
  word-spacing: normal;
}

#services-motto h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2rem);
  text-align: center;
  padding-top: 10px;
}

#services-motto p {
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

#services-details ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 20px;
  text-align: left;
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.5rem);
}

#residential-services,
#commercial-services {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(1rem, 1rem + 2vw, 1.8rem);
}

/* Small screens and mobile devices */
@media screen and (max-width: 768px) {
  /* Reset body margins for mobile */
  body {
    margin-left: 0;
    margin-right: 0;
    font-size: 16px;
  }

  /* Hide side decorative images */
  body::before,
  body::after {
    display: none;
  }

  /* Main content sizing */
  #content {
    width: 95%;
    margin: 15px auto;
    padding: 15px;
    border-radius: 0;
  }

  #logo-header {
    padding: 15px;
    width: 100%;
  }

  #logo-image {
    max-width: 250px;
    height: 80px;
  }

  /* Navigation */
  #nav-bar {
    width: 95%;
    margin: 10px auto;
    padding: 0 10px;
    box-sizing: border-box;
    overflow-x: auto;
  }

  nav a {
    margin: 0 8px;
    font-size: 0.95rem;
    padding: 8px 12px;
  }

  /* Main sections */
  #gallery-overview,
  #company-history,
  #our-mission,
  #our-team,
  #introduction,
  #why-choose-us,
  #services-overview {
    width: 95%;
    font-size: 1rem;
    padding: 0 15px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
  }

  #gallery-overview h2,
  #company-history h2,
  #our-mission h2,
  #our-team h2,
  #services-motto h2,
  #contact-us h2 {
    font-size: 1.3rem;
  }

  #gallery-overview p,
  #company-history p,
  #our-mission p,
  #our-team p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  #introduction p {
    font-size: 1rem;
    line-height: 1.6;
  }

  #contact-us p {
    font-size: 0.95rem;
    width: 100%;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .gallery-grid img {
    height: 120px;
  }

  /* Services */
  #services-overview {
    width: 95%;
    font-size: 0.95rem;
    padding: 15px;
    box-sizing: border-box;
  }

  #services-overview ul {
    padding-left: 25px;
    text-align: left;
  }

  #services-details ul {
    grid-template-columns: 1fr;
    width: 95%;
    gap: 10px;
    font-size: 0.95rem;
    padding: 0 15px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
  }

  #services-motto p {
    font-size: 0.95rem;
    width: 95%;
  }

  #residential-services,
  #commercial-services {
    width: 95%;
    font-size: 1rem;
    padding: 0 15px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
  }

  /* Images */
  #intro-image,
  #team-photo img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
  }

  /* Contact form */
  #contact {
    width: 95%;
    margin: 0 auto;
    padding: 15px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contact-info,
  .contact-form {
    padding: 15px;
  }

  input,
  textarea {
    width: 95%;
    padding: 10px;
    font-size: 16px;
  }

  input[type="submit"] {
    width: 100%;
    padding: 12px;
  }

  /* Horizontal rule */
  hr {
    width: 90%;
  }

  /* FOOTER - Mobile */
  footer #information {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 95%;
    margin: 0 auto;
    padding: 15px;
    gap: 12px;
    box-sizing: border-box;
  }

  footer #name {
    font-size: 1rem;
    font-weight: bold;
    width: 100%;
    text-align: center;
    margin: 0;
  }

  footer #address {
    font-size: 0.85rem;
    text-align: center;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
  }

  footer #address a {
    display: inline;
  }

  footer #hours {
    font-size: 0.85rem;
    text-align: center;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
  }

  footer #hours p {
    margin: 0 0 5px 0;
    font-weight: 600;
    font-size: 0.9rem;
  }

  footer #hours ul {
    margin: 0;
    padding: 0;
  }

  footer #hours li {
    padding: 2px 0;
  }

  footer #service-area {
    font-size: 0.85rem;
    text-align: center;
    padding: 0;
    margin: 0;
    border: none;
    width: 100%;
  }

  footer #service-area p {
    margin: 0 0 5px 0;
    font-weight: 600;
    font-size: 0.9rem;
  }

  footer #service-area ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  footer #service-area li {
    padding: 0;
  }

  footer #social-media {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    border: none;
    width: 100%;
  }

  footer #social-media p {
    display: none;
  }

  footer .social-link {
    margin: 0 !important;
  }

  footer .social-link i {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 480px) {
  /* Tighter spacing */
  body {
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
  }

  #logo-image {
    max-width: 200px;
    height: 65px;
  }

  /* Navigation */
  #nav-bar {
    width: 98%;
    margin: 8px auto;
    padding: 0 5px;
  }

  nav a {
    margin: 0 1px;
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  /* Main sections */
  #gallery-overview,
  #company-history,
  #our-mission,
  #our-team,
  #introduction,
  #why-choose-us,
  #services-overview {
    width: 98%;
    padding: 0 10px;
  }

  #gallery-overview h2,
  #company-history h2,
  #our-mission h2,
  #our-team h2,
  #services-motto h2,
  #contact-us h2 {
    font-size: 1.1rem;
    margin: 10px 0 8px 0;
  }

  #gallery-overview p,
  #company-history p,
  #our-mission p,
  #our-team p,
  #introduction p,
  #contact-us p {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  /* Content box */
  #content {
    width: 98%;
    margin: 10px auto;
    padding: 12px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .gallery-grid img {
    height: 100px;
  }

  /* Services */
  #services-overview {
    font-size: 0.9rem;
    padding: 12px;
  }

  #services-overview h2 {
    font-size: 1.1rem;
  }

  #services-overview ul {
    padding-left: 20px;
  }

  #services-details ul {
    width: 98%;
    gap: 8px;
    font-size: 0.9rem;
    padding: 0 10px;
  }

  #services-motto p {
    font-size: 0.9rem;
    width: 98%;
  }

  #residential-services,
  #commercial-services {
    width: 98%;
    font-size: 0.95rem;
    padding: 0 10px;
  }

  /* Images */
  #intro-image,
  #team-photo img {
    margin: 12px 0;
  }

  /* Contact form */
  #contact {
    width: 98%;
    padding: 12px;
  }

  .contact-info,
  .contact-form {
    padding: 12px;
  }

  .contact-info h3,
  .contact-form h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  input,
  textarea {
    width: 98%;
    padding: 8px;
    font-size: 16px;
  }

  /* Footer */
  footer #information {
    width: 98%;
    padding: 12px;
    gap: 10px;
  }

  footer #name {
    font-size: 0.95rem;
  }

  footer #address,
  footer #hours,
  footer #service-area {
    font-size: 0.8rem;
  }

  footer #hours p,
  footer #service-area p {
    font-size: 0.85rem;
  }

  footer .social-link i {
    font-size: 1.2rem;
  }

  /* Misc */
  hr {
    width: 95%;
  }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
  /* Tablet adjustments */
  body {
    margin-left: 50px;
    margin-right: 50px;
  }

  /* Optimize information grid for tablet */
  #information {
    gap: 10px;
    padding: 12px;
  }

  /* Adjust content widths for tablet */
  #content,
  #company-history,
  #our-mission,
  #our-team,
  #introduction,
  #why-choose-us {
    width: 90%;
  }

  /* Adjust services overview for tablet */
  #services-overview {
    width: 90%;
    font-size: 1rem;
  }

  /* Optimize gallery grid for tablet */
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }

  /* Adjust font sizes for readability */
  #introduction p {
    font-size: 1.2rem;
  }

  #why-choose-us p,
  h2 {
    font-size: 1.2rem;
  }

  #services-motto h2 {
    font-size: 1.2rem;
  }

  #services-motto p {
    font-size: 1rem;
    width: 90%;
  }

  /* Adjust contact section for tablet */
  #contact {
    width: 90%;
    padding: 20px;
  }

  .contact-grid {
    gap: 20px;
  }

  #contact-us p {
    font-size: 1rem;
    width: 85%;
  }

  /* Service details layout for tablet */
  #services-details ul {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
    gap: 12px;
    font-size: 0.95rem;
  }

  /* Footer information for tablet */
  footer #information {
    gap: 8px;
    padding: 12px;
  }

  /* Adjust images for tablet */
  #intro-image,
  #team-photo img {
    max-width: 450px;
  }

  /* Navigation adjustments */
  #nav-bar {
    width: 90%;
  }

  nav a {
    font-size: 1rem;
    margin: 0 10px;
  }
}

@keyframes fadeInUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

.fadeInUp-animation {
  animation: 1.5s fadeInUp;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.fade-in-on-load {
  animation: fadeIn 1s ease-in forwards; /* Fades in over 1s, stays visible */
}

.fade-out-then-hide {
  animation: fadeOut 2s ease-out forwards; /* Fades out over 2s, stays invisible */
}

.pulse-fade {
  animation: pulseFade 3s infinite alternate ease-in-out;
}

@keyframes pulseFade {
  0% {
    opacity: 0.3;
  }
  100% {
    opacity: 1;
  }
}
