/* define variables */
:root {
  --orange: #f88746;
  --orange-rgb: 248, 135, 70;
}

/*  Google Font Example
.roboto-<uniquifier> {
   font-family: "Roboto", sans-serif;
   font-optical-sizing: auto;
   font-weight: <weight>;
   font-style: normal;
   font-variation-settings:
       "wdth" 100;
}
*/

* {
  font-family: 'Roboto', sans-serif;
}

body {
  background: #fff;
  height: 100vh;
  overflow-x: hidden;
}
#page-wrapper {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

h1 {
  font-size: 1.5rem;
}

a, button, img {
  display: inline-block;
}

p {
  font-size: 1.2rem;
}

img {
  max-width: 100%;
  max-height: 100%;
}

.btn {
  background: var(--orange);
  border: 0;
  border-radius: 0;
  color: #000;
  cursor: pointer;
  display: inline-block;
  font-size: 1rem;
  padding: .45rem 1.5rem;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s ease;

  &:hover {
    background: #e6763a;
  }

	svg.btn-icon {
		height: 1rem;
		width: 1rem;
		margin-left: .5rem;
		vertical-align: middle;
		transform: rotate(-90deg) translateX(1px);
	}
}

.select-wrapper {
  position: relative;

  .chevron {
    align-items: center;
    background-color: var(--orange);
    color: #000;
    content: '';
    display: flex;
    font-size: 2rem;
    justify-content: center;
    position: absolute;
    pointer-events: none;
    top: 0; right: 0; bottom: 0;
    height: 100%;
    width: 38px;
    z-index: 1;
  }
}

ul.pagination {
	.page-link {
		color: var(--orange);
	}
	.page-link:focus {
		box-shadow: none;
	}
	.page-item.active .page-link {
		background-color: var(--orange);
		border-color: var(--orange);
		color: #fff;
	}
}

/* Header CSS ------------------------------------------------*/
header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: .25rem 1rem;
  z-index: 100;
  width: 100%;

  #logo {
    height: 100%;
    max-width: 240px;
    width: 100%;
    position: relative;

    img {
      height: 170px;
      width: auto;
      max-width: calc(100% - 1rem);
      max-height: none;
      position: absolute;
      top: .5rem;
      left: .5rem;
      object-fit: contain;
      object-position: left top;
    }
  }

  #menu-btn {
    background: none;
    border: 0;
    display: block;
    cursor: pointer; /* Added for better UX */
    margin-right: .5rem;
    padding: 1rem;

    span {
      display: block;
      width: 33px;
      height: 4px;
      margin-bottom: 5px;
      position: relative;
      background: var(--orange); /* Fallback color */
      border-radius: 3px;
      z-index: 1;
      transform-origin: center; /* Center for consistent rotation */
      transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
        opacity 0.55s ease,
        background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    }

    span:last-child {
      margin-bottom: 0;
    }
  }

  nav {
    display: none;
  }
}

#mobile-menu {
  background: #fff;
  box-shadow: -2px 0 5px rgba(255,255,255, 0);
  height: 100vh;
  position: absolute;
  top: 0; left: 100%;
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  width: 250px;
  z-index: 100;

  & > a {
    display: block;
    padding: 1rem;
    text-align: center;

    img {
      height: 60px;
      width: auto;
    }
  }

  ul {
    list-style: none;
    margin: 0;
    padding: 0;

    li {
      margin: 0;

      a {
        color: #333;
        display: block;
        padding: .5rem 1rem;
        text-decoration: none;
        text-transform: uppercase;

        &:hover {
          color: var(--orange);
        }
      }

      ul {
        a {
          padding-left: 1.5rem;

          &:before {
            content: ' –   ';
          }
        }
      }
    }
  }
}
#page-wrapper {
  transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

.menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0),
              transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

body.open-menu {
  #menu-btn {
    background: var(--orange);

    span {
      background: #fff;
    }
    span:nth-child(1) {
      transform: rotate(45deg) translate(7px, 6px);
    }
    span:nth-child(2) {
      opacity: 0;
    }
    span:nth-child(3) {
      transform: rotate(-45deg) translate(7px, -6px);
    }
  }

  #mobile-menu {
    backface-visibility: hidden;
    transform: translateX(-250px);
  }
  #page-wrapper {
    transform: translateX(-250px);
  }

  .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}
/* End Header CSS ------------------------------------------------*/

/* Footer CSS ------------------------------------------------*/
footer {
  background: #000;
  color: #fff;
  padding: 1.5rem 0;
  width: 100%;
  z-index: 92;

  a {
    color: #fff;
    text-decoration: none;
  }

  .license-info {
    font-size: .9rem;
    white-space: nowrap;
  }

  .social-links {
    img {
      width: 45px;
      height: 45px;
    }
  }

  .phone-number {
    font-size: 2rem;
    line-height: 1;
  }

  .copyright {
    font-size: .75rem;
  }
}


/* Home CSS ------------------------------------------------*/
body.index {
  header {
    position: absolute;
    top: 0; left: 0; right: 0;

    #menu-btn {
      margin-top: 1rem;
    }
  }

  .carousel-inner .carousel-item {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    display: block;
  }
  .carousel-inner .carousel-item:first-of-type {
    position: relative;
  }
  .carousel-inner .active {
    opacity: 1;
  }

  #home-slider {
    .carousel-item {
      &:after {
        content: ''; /* Required for pseudo-element */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, .7) 0%,      /* Dark overlay at top */
            rgba(0, 0, 0, 0) 40%,       /* Fade to transparent */
						rgba(0, 0, 0, 0) 60%,       /* Stay transparent */
            rgba(0, 0, 0, .7) 100%     /* Fade back to dark at bottom */
        );
        z-index: 1;
      }
    }

    .carousel-caption {
      color: var(--orange);
      font-weight: 900;
      text-align: right;
      position: absolute;
      left: auto;
      right: 0;
      bottom: 0;
      text-transform: uppercase;
      z-index: 2;

      h2 {
        font-size: 3.5rem;
        padding: 0 2rem;
      }

      span {
        color: #fff;
      }
    }
  }
}
/* End Home CSS ------------------------------------------------*/

/* Internal Pages CSS ------------------------------------------------*/
section.banner {
  height: 200px;
  position: relative;

  &:after {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, .75) 0%,      /* Dark overlay at top */
        rgba(0, 0, 0, 0) 55%    /* Fade to transparent */
    );
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
  }
}

.gallery {
  figure {
    position: relative;

    a {
      width: 100%;

      img {
        width: 100%;
      }
    }

    &:after {
      /* Darker at the bottom, fading upward to transparent */
      background: linear-gradient(
        to top,
        rgba(0, 0, 0, .5) 0%,    /* darkest at bottom */
        rgba(0, 0, 0, 0) 55%     /* fade to transparent partway up */
      );
      content: '';
      pointer-events: none;
      position: absolute;
      top: 0; right: 0; bottom: 0; left: 0;
      z-index: 0;
    }

    figcaption {
      pointer-events: none;
      position: absolute;
      left: 0; right: 0; bottom: 0;
      color: #fff;
      padding: .5rem;
      z-index: 1;
    }
  }
}

#contact-form {
  background: lightgrey;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;

  input#address {
    display: none;
  }

  *:not(.half) {
    grid-column: span 2;
  }

  input, select, textarea {
    border-radius: 0;
    outline: 0;
    box-shadow: none !important;

    &:focus {
      border-color: var(--orange) !important;
    }
  }

  .msg-box {
    display: none;
  }
}

/* End Internal Pages CSS ------------------------------------------------*/

/* Real Estate CSS ------------------------------------------------*/
body.real-estate {
  address {
    font-size: 1.5rem;
    margin-bottom: .5rem;
  }

  .main-specs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    list-style: none;
    padding: 1rem 0;
    margin-bottom: 0;

    li {
      font-size: 1.2rem;

      span {
        color: grey;
        display: block;
        font-size: .8rem;
      }

      &.spacer {
        background-color: grey;
        height: 1.8rem;
        opacity: .35;
        width: 2px;
      }

      &.spacer:last-child {
        display: none;
      }
    }
  }

  #real-estate-gallery {
    .gallery-grid {display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;

      a:first-child {
        grid-column: span 2;
      }
      a:first-child ~ a {
        grid-column: span 1;
      }

      a {
        position: relative;

        &:after {
          /* Darker at the bottom, fading upward to transparent */
          background: linear-gradient(
            to top,
            rgba(0, 0, 0, .5) 0%,    /* darkest at bottom */
            rgba(0, 0, 0, 0) 55%     /* fade to transparent partway up */
          );
          content: '';
          opacity: 0;
          pointer-events: none;
          position: absolute;
          top: 0; right: 0; bottom: 0; left: 0;
          transition: opacity 0.3s ease;
          z-index: 0;
        }

        &:hover:after {
          opacity: 1;
        }
      }

      img {
        object-fit: cover;
      }
    }
  }

  .control-container {
    align-items: center;
    background: #000;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    padding: .5rem 0;
    position: relative;
    z-index: 2;


    button, .carousel-indicators {
      position: relative;
    }

    .carousel-indicators {
      margin: 0;

      button {
        width: 10px;

        &.active {
          background-color: var(--orange);
        }
      }
    }
  }

  .accordion-item:first-of-type>.accordion-header .accordion-button, 
	.accordion-item:first-of-type, 
	.accordion-item:last-of-type 
	{
    border-radius: 0;
  }
  .accordion-item {
    border-color: #000;
  }

  .accordion-button {
    background-color: #fff;
    border-color: #000;
    box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 #eee;
    color: #000;
    display: flex;
    justify-content: space-between;
    z-index: 1;
  }

  .accordion-button::after {
    display: none;
  }

  .accordion-button[aria-expanded="true"] {
    background-color: #000;
    color: var(--orange);
    font-weight: bold;
  }

  .accordion-button svg {
    height: 1.5rem;
    width: 1.5rem;
    stroke: var(--orange);
    transform: rotate(-180deg);
    transition: transform 0.3s ease;
  }

  .accordion-button[aria-expanded="false"] svg {
    transform: rotate(0deg);
    stroke: #000;
  }
}
/* End Real Estate CSS ------------------------------------------------*/

/* Media Queries ------------------------------------------------*/
@media (min-height: 600px) {
  body.index {
    #home-slider {
      .carousel-caption {
        bottom: 25%;
      }
    }

    footer {
      background: transparent;
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
    }
  }
}

@media (min-height: 768px) or (min-width: 768px) {
  body.index {
    #home-slider {
      .carousel-caption {
        h2 {
          font-size: 4.5rem;
        }
      }
    }
  }
}


@media (min-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }
  body.index {
    #home-slider {
      .carousel-caption {
        bottom: 30%;
      }
    }

    footer {
      background: transparent;
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;

      .social-links {
        img {
          width: 60px;
          height: 60px;
        }
      }
    }
  }

  section.banner {
    height: 350px;
  }

  #contact-form {
    * {
      grid-column: span 2;
    }
  }

  body.real-estate {
    #real-estate-gallery {
      .gallery-grid {
        grid-template-columns: 2fr 1fr;

        a:first-child {
          grid-column: span 1;
          grid-row: span 2;
        }

        img {
          height: 100%;
        }
      }
    }
    .control-container {
      .carousel-indicators {
        button {
          width: 20px;
        }
      }
    }
  }
}

@media (min-width: 1025px) {
  h1 {
    font-size: 2rem;
  }
  header {
    align-items: flex-start;

    #logo {
      height: 100%;
      max-width: none;
      position: relative;
      width: 100%;

      img {
        height: 170px;
        width: auto;
        max-width: calc(100% - 1rem);
        position: absolute;
        top: .5rem;
        left: .5rem;
        object-fit: contain;
        object-position: top left;
      }
    }

    #menu-btn {
      display: none;
    }

    nav {
      box-shadow: none;
      display: flex;
      height: auto;
      position: static;
      transform: translateX(0);
      width: auto;

      & > a {
        display: none;
      }

      ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;

        li {
          position: relative;

          a {
            color: #000;
            font-size: .9rem;
            padding: 1rem .75rem 1rem;
            text-decoration: none;
            text-transform: uppercase;
            white-space: nowrap;
          }

          ul {
            background-color: #fff;
            display: none;
            flex-direction: column;
            position: absolute;
            top: 100%; left: 0;

            a {
              border-bottom: 1px solid #D3D3D3FF;
              color: #000 !important;
              padding: .5rem .75rem;


              &:before {
                display: none;
              }
              &:hover {
                color: var(--orange) !important;
              }
            }
          }

          &:hover {
            & > a {
              color: var(--orange);
            }

            ul {
              display: flex;
            }
          }
        }
      }
    }
  }

  #mobile-menu {
    display: none;
  }

  .menu-overlay {
    display: none;
  }

  body.open-menu {
    #page-wrapper {
      transform: translateX(0);
    }
  }

  body.index {
    header {
      nav {
        ul {
          li {
            a {
              color: #fff;
            }

						&:hover {
							& > a {
								color: var(--orange);
							}
						}
          }
        }
      }
    }
  }

  section.banner {
    height: 450px;
  }

  body.real-estate {
    .control-container {
      .carousel-indicators {
        button {
          width: 30px;
        }
      }
    }
  }
}

@media (min-width: 1280px) {
  h1 {
    font-size: 2.25rem;
  }
  header {
    nav {
      ul {
        li {
          a {
            font-size: 1rem;
          }
        }
      }
    }
  }

  #contact-form {
    *.half {
      grid-column: span 1;
    }
    *:not(.half) {
      grid-column: span 2;
    }
  }
}