@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

:root {
  --blue: #324847;
  --dark-blue: #4b6b6a;
  --background: #081118;
  --grey: #333;
  --light-grey: #3b3b3b;
}
.mmenu {
  padding: 100px;
  width: 20rem;
  border-radius: 0.2rem;
  overflow: hidden;
}
.mmenu a {
  text-decoration: none;
}

.menu-item {
  list-style: none;
  border-top: 1px solid var(--dark-blue);
  overflow: hidden;
}

.btn {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--blue);
  color: white;
  position: relative;
}
.btn::before {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  background: var(--blue);
  left: 1.5rem;
  bottom: -0.5rem;
  transform: rotate(45deg);
}
.btn i {
  margin-right: 1rem;
}

.menu-item__sub {
  background: var(--grey);
  overflow: hidden;
  transition: max-height 0.3s;
  max-height: 0;
}
.menu-item__sub a {
  display: block;
  padding: 1rem 1.6rem;
  color: white;
  font-size: 0.9rem;
  position: relative;
  border-bottom: 1px solid var(--light-grey);
}
.menu-item__sub a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0.4rem;
  height: 100%;
  background: var(--blue);
  transform: translatex(-0.4rem);
  transition: 0.3s;
  opacity: 0;
}
.menu-item__sub a:hover::before {
  opacity: 1;
  transform: translatex(0);
}

.menu-item:target .menu-item__sub {
  max-height: 10em;
}

.menu-item__sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-left: 1rem; /* Indent submenus */
}

.btn {
  display: block;
  padding: 1rem;
  color: #fff;
  background: #4b6b6a;
  cursor: pointer;
}

.btn:hover {
  background: #324847;
}

.menu-item:target > .menu-item__sub,
.menu-item__sub:target {
  max-height: 10em;
}

.sub-btn {
  display: block;
  color: white;
  padding: 1rem 1.6rem;
  position: relative;
}

.sub-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0.4rem;
  height: 100%;
  background: var(--blue);
  transform: translateX(-0.4rem);
  opacity: 0;
  transition: 0.3s;
}

.sub-btn:hover::before {
  opacity: 1;
  transform: translateX(0);
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Lato", sans-serif;
  font-weight: 600;
  font-style: normal;
}

body {
  background-color: #4b6b6a;
  height: 1000px;
}
.navbar {
  background: #4b6b6a;
  height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  border-bottom: 4px solid #e8dfb6;
  border-image-slice: 1;
  padding: 0 40px;
}

/* Flexbox layout for logo and menu items */
.navbar__container {
  display: flex;
  align-items: center;
  margin: 0 auto;
  width: 100%;
  justify-content: space-between;
}

/* Logo size */
.sc-logo {
  width: 160px;
  height: 90px;
}

/* Horizontal menu list inside navbar */
.navbar__menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

/* Individual menu item alignment */
.navbar__item {
  height: 80px;
  display: flex;
  align-items: center;
}

/* Styled navigation links with gradient text */
.navbar__links {
  background: #e8dfb6;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 14px;
  text-decoration: none;
  padding: 0.5rem;
}

/* Hover effect for nav links */
.navbar__links:hover {
  -webkit-text-fill-color: #cbbf97;
  transition: all 0.3s ease-in-out;
  font-size: 16px;
  text-decoration: underline #cbbf97;
}

/* Hamburger icon hidden by default */
.navbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  height: 50px;
  width: 40px;
  margin-left: 0;
  margin-right: 5px;
  position: relative;
  visibility: hidden;
}

/* Hamburger bars */
.navbar__toggle .bar {
  height: 5px;
  width: 100%;
  background-color: #e8dfb6;
  border-radius: 4px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: 0.3s ease;
}

/* Position top and bottom bars */
.navbar__toggle .bar:nth-child(1) {
  top: 25%;
}
.navbar__toggle .bar:nth-child(3) {
  top: 75%;
}

/* Active state (X icon) */

.navbar__toggle.active .bar:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}
.navbar__toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.navbar__toggle.active .bar:nth-child(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Off-screen menu for small screens (hidden initially) */
/* Dropdown menu - hidden by default */
.off-screen {
  position: fixed; /* changed from fixed */
  top: 80px; /* height of navbar */
  left: 0;
  width: 100%;
  height: auto;
  /* background: #081118; */
  transition: max-height 0.3s ease;
  z-index: 998; /* below navbar */
  overflow: hidden;
  max-height: 0; /* collapsed by default */
  transition: max-height 0.4s ease-in-out;
}
.off-screen.active {
  max-height: 100vh; /* enough to show full menu */
}

/* Optional overlay (fade background when menu is open) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 997; /* under navbar and menu */
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/*  */
.dropdown {
  position: relative;
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0%;
  background-color: #2f4746;
  border-bottom: 1px solid #4b6b6a;
  min-width: 150px;
  flex-direction: column;
  list-style-type: none;
  z-index: 1000;
}

.dropdown__link {
  padding: 10px 15px;
  color: #e8dfb6;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  z-index: 0;
}

.dropdown__link:hover {
  background-color: #4b6b6a;
  color: white;
}

.dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background-color: #2f4746;
  border-bottom: 1px solid #4b6b6a;
  min-width: 150px;
  flex-direction: column;
  list-style: none;
  z-index: 1000;
}

.dropdown.active > .dropdown__menu {
  display: flex;
}
/* Nested DropDown */

/* Position the nested submenu */
/* Base submenu */
.dropdown__submenu {
  display: none;
  position: absolute;
  top: 0; /* aligns to top of parent li */
  left: 100%; /* appears to the right of parent li */
  background-color: #2f4746;
  min-width: 150px;
  flex-direction: column;
  list-style: none;
  z-index: 1001;
  border-bottom: 1px solid #4b6b6a;
}

/* Parent li relative positioning for submenu */
.dropdown__submenu li.has-submenu {
  position: relative;
}

/* Show submenu on hover */
.dropdown__submenu li.has-submenu:hover > .dropdown__submenu {
  display: flex;
}

/* Optional arrow styling */
.dropdown__link .arrow {
  float: right;
  margin-left: 5px;
  transition: transform 0.2s;
}

.dropdown__submenu li.has-submenu:hover > .dropdown__link .arrow {
  transform: rotate(90deg);
}

/* Show nested submenu on hover */
.dropdown:hover > .dropdown__submenu {
  display: flex;
}

/* Style links inside nested submenu */
.dropdown__submenu .dropdown__link {
  padding: 10px 15px;
  color: #e8dfb6;
  white-space: nowrap;
}

.dropdown__submenu .dropdown__link:hover {
  background-color: #4b6b6a;
  color: white;
}

.arrow {
  margin-left: 10px;
  font-size: 12px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.dropdown:hover > .dropdown__link .arrow {
  transform: rotate(90deg);
  margin-left: 70px;
  transition: all 0.3s ease-in;
}

/* Style off-screen menu items */
.off-screen ul {
  list-style: none;
  padding: 0;
}

.off-screen .navbar__item {
  width: 100%;
  justify-content: start;
  padding: 1rem 0;
  font-size: 16px;
}

.off-screen .navbar__links {
  font-size: 20px;
}

/* Responsive adjustments for mobile screens */
@media screen and (max-width: 768px) {
  .navbar__container > .navbar__menu {
    display: none;
  }

  .navbar__toggle {
    display: flex;
    visibility: visible;
  }

  .off-screen.active {
    display: flex;
  }

  .off-screen .navbar__menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
  }

  .navbar__menu {
    display: none;
  }
}

/* == == == */

/* == Hero - Desc */
.hero {
  margin-top: 5rem;
  max-height: 1500px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero img {
  height: 500px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.title-desc {
  /* height: 400px; */
  padding: 2rem 4rem;
  box-sizing: border-box;
  background-color: #f9f9f9;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start; /* This ensures ALL content (h1, hr, p) align left */
  gap: 1rem; /* Optional: adds spacing between elements */
}

.title-desc h1 {
  font-size: 3rem;
  margin: 0;
  font-weight: 400;
}

.title-desc hr {
  width: 300px;
  margin: 1rem 0;
  border: 2px solid #000;
}

.title-desc p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0; /* removes auto-centering */
  line-height: 1.6;
  font-weight: 300;
}

.price-enquiry {
  text-align: center;
  margin-top: 20px;
}

.price-enquiry h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.call-us-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4b6b6a;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.call-us-btn:hover {
  background-color: #cbbf97;
}
/* == gallery == */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* exactly 3 columns */
  gap: 2rem;
  max-width: 1200px; /* controls overall width */
  margin: 2rem auto; /* centers the grid horizontally */
  padding: 0 1rem; /* adds space on smaller screens */
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  cursor: pointer;
}

.image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* keep it square */
  overflow: hidden;
  border-radius: 4px;
}

.image-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity 0.4s ease;
}

.card.has-hover .main-img {
  opacity: 1;
  z-index: 1;
}

.card.has-hover .hover-img {
  opacity: 0;
  z-index: 2;
}

.card.has-hover:hover .hover-img {
  opacity: 1;
}

.card.has-hover:hover .main-img {
  opacity: 0;
}

.card-name {
  padding: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 700px;
  text-align: center;
  border-radius: 10px;
  position: relative;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.modal-content h3 {
  margin-top: 1rem;
  font-size: 1.5rem;
}

/* .modal-content p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #333;
} */

#modalInfo ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem;
}
#modal-info li {
  margin-bottom: 0.5em;
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

.pagination-controls {
  text-align: center;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.pagination-controls button {
  padding: 0.5rem 1.2rem;
  font-size: 1rem;
  cursor: pointer;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: #555;
}

.pagination-controls button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

#pageIndicator {
  font-weight: bold;
}

.quick-links {
  padding: 2rem;
  background-color: #4b6b6a;
  color: #222;
  text-align: center;
}

.quick-top-wrapper img {
  max-width: 120px;
  height: auto;
  /* margin-bottom: 1rem; */
  margin: 1rem auto;
}

.quick-top-wrapper h1 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.quick-bottom-wrapper {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  text-align: left;
}

.service,
.quick-link {
  flex: 1 1 200px;
  max-width: 250px;
}

.service h2,
.quick-link h2 {
  color: #fff;

  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.service hr,
.quick-link hr {
  border: none;
  height: 2px;
  background-color: #00bcd4;
  width: 20%;
  margin-bottom: 1rem;
}

.service ul,
.quick-link ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service li,
.quick-link li {
  color: #fff;

  margin-bottom: 0.5rem;
}

.service a,
.quick-link a {
  color: inherit;
  text-decoration: none;
}

.service a:hover,
.quick-link a:hover {
  text-decoration: underline;
}

/* == Footer == */

.footer {
  background-color: #202020;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: #fff;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Adds vertical spacing between <p>s */
  text-align: center;
}

.footer-top {
  font-weight: 500;
}

.footer-info {
  line-height: 1.6;
}

.footer-link a {
  color: #0073e6;
  text-decoration: none;
}

.footer-link a:hover {
  text-decoration: underline;
}

@media screen and (max-width: 768px) {
  .grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* exactly 3 columns */
    gap: 2rem;
    max-width: 1200px; /* controls overall width */
    margin: 2rem auto; /* centers the grid horizontally */
    padding: 0 1rem; /* adds space on smaller screens */
  }
}
