* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9ffea9d;
  color: #333;
  line-height: 1.6;
  text-align: center;
  padding: 2rem 1rem;
  word-break: break-word;
}

h1 {
  font-size: 3rem !important;
}
h2 {
  font-size: 1.5rem !important;
}
h3 {
  font-size: 1rem !important;
}

.hero-content,
.signup-container,
.business-card {
  background: #fff;
  /* max-width: 1300px; */
  max-width: 90%;
  width: 95%;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.signup-container {
  max-width: 60% !important;
  border: 2px solid #a4cb3f !important;
}

.hero-image {
  display: block;
  width: 95%;
  margin: auto;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.signup-text {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
}

.signup-instructions {
  font-size: 0.95rem;
  background: #f5ffe1;
  border-left: 4px solid #a4cb3f;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  color: #444;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.signup-form input,
.signup-form button {
  width: 100%;
  min-height: auto;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
}

.signup-form input:focus {
  border-color: #A4CB3F;
  outline: none;
}

.signup-form button {
  background-color: #A4CB3F;
  color: #fff;
  border: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.signup-form button:hover {
  background-color: #A4CB3F;
  cursor: pointer;
}

.form-status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  background-color: #e6ffed;
  color: #1e7e34;
  border: 1px solid #28a745;
}

.form-status.error {
  background-color: #ffe6e6;
  color: #a80000;
  border: 1px solid #dc3545;
}

ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

li {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: #222;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  list-style-type: none !important;
}

a {
  color: #A4CB3F;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  display: block;
  margin: auto;
  width: auto; 
  max-width: 95%;
  height: auto;
  max-height: 85vh;
  border-radius: 8px;
  touch-action: pinch-zoom;
  -ms-touch-action: pinch-zoom;
}

.map-container {
  max-width: 96%; 
  margin: 2rem auto;
  margin-top: 0px !important;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.business-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  max-width: 80%;
  margin: auto;
}

.business-card-left,
.business-card-right {
  display: flex;
  flex-direction: column;
}

.business-card-logo img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 10%;
  margin-bottom: 1rem;
}

.business-card-left h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.business-card-left .tagline {
  font-size: 1rem;
  font-style: italic;
  color: #555;
  margin-bottom: 1rem;
}

.business-card-left .description {
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 1rem;
}

.business-card-right .contact-info,
.business-card-right .social-links {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.business-card-right .contact-info li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.business-card-right .contact-info a {
  color: #A4CB3F;
  text-decoration: none;
}

.business-card-right .contact-info a:hover {
  text-decoration: underline;
}

.business-card-right .social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.business-card-right .social-links li a {
  font-size: 1.2rem;
  color: #A4CB3F;
  transition: color 0.3s;
}

.business-card-right .social-links li a:hover {
  color: #6f9e2a;
}

@media (max-width: 768px) {
  .business-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .business-card-right .contact-info li {
    justify-content: center;
  }

  .business-card-right .social-links {
    justify-content: center;
  }
}

.icon-colored {
  color: #A4CB3F;
}

.more-listings ul > li + li {
  margin-top: 1.25vw;
}

.business-card {
  height: 350px;
}

strong {
  font-weight: 500;
}

.map-container iframe {
  width: 100%;
  height: 900px;
  border: 0;
  border-radius: 8px;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 2fr; 
  gap: 0rem;
  max-width: 100%;
  margin: 2rem auto;
  margin-top: 0px !important;
  padding: 0 1rem;
  align-items: start;
  margin-bottom: 0px !important;
}

.content-grid > * {
  max-height: 450px;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.business-card {
  overflow-y: auto;
}

.business-card::-webkit-scrollbar {
  width: 5px;
}

.business-card::-webkit-scrollbar-thumb {
  background-color: #a3cb3f82;
  border-radius: 4px;
}

.address-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
}

.address {
  margin-right: 3.2em;
}

.street {
  margin-left: 2.5rem;
}

.city-zip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: end;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  user-select: none;
  transition: 0.3s;
}

.close-modal:hover {
  color: #a4cb3f; 
}
@media (max-width: 1024px) {
  body {
    padding: 1rem;
  }

  .content-grid {
    grid-template-columns: 2fr 2fr; 
    padding: 0;
    margin: 0;
    margin-bottom: 1.5rem !important;
  }

  .content-grid > * {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    padding: 1.25rem;
    width: 100%;
    box-sizing: border-box;
  }

  .signup-container,
  .hero-content,
  .business-card,
  .map-container {
    padding: 1.25rem;
    margin: 1.5rem auto;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .signup-container {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
  }

  .map-container iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }
  .signup-form input,
  .signup-form button {
    font-size: 1rem;
    padding: 0.9rem;
  }

  h1 {
    font-size: 2.25rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  h3 {
    font-size: 1rem !important;
  }

  .city-zip {
    align-items: flex-start;
    text-align: left;
  }
  
  .address{
    margin-left: 0rem !important;
  }
  .street {
    margin-left: 0rem !important;
  }

  .address-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .modal-content {
    max-height: 80vh;
  }

  .close-modal {
    font-size: 2rem;
    top: 15px;
    right: 15px;
  }

  .signup-container {
    order: 1;
  }

  .business-card {
    order: 2;
  }

  .map-container {
    order: 3
  }
}

.map-container {
  grid-column: 1 / -1; 
  width: 100%;
}

@media (min-width: 481px) and (max-width: 1024px) {
  .map-container iframe {
    width: 100% !important;
    height: 100%;
    display: block;
  }

}
@media (min-width: 1025px) {
  .map-container iframe {
    height: calc(80vh) !important;
    max-height: 900px;
    /* margin-bottom: -30px; */
  }

  .content-grid .map-container {
    min-height: 100%;
    max-height: calc(250px + 10vw) !important;
  }
  .content-grid .map-container iframe {
    min-height: 100%;
    max-height: 100% !important;
  }
  .content-grid.no-signup {
    grid-template-areas:
      "business"
      "map map";
    grid-template-columns: 2fr 2fr;
  }

  .content-grid.no-signup.no-agent {
    grid-template-areas:
      "business"
      "map";
    grid-template-columns: 2fr;
  }

  .content-grid.no-signup .signup-container {
    display: none !important;
  }
}

.company-logo-link {
  display: block;
  text-align: center;
  border-radius: 8px;
  max-width: 200px;
  margin: 0 auto;
  text-decoration: none;
}

.company-logo-link img {
  display: block;
  margin: 0 auto;
  max-width: 100px;
}

.company-logo-link:hover {
  cursor: pointer;
}

@media (min-width: 1025px) {
  .content-grid {
    display: grid;
    grid-template-areas:
      "business signup bruh"
      "map map more";
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 95% !important;
    margin: 2rem auto;
  }

  .address-row {
    max-width: 95% !important;
    margin: 2rem auto;
  }

  .business-card {
    grid-area: business;
  }

  .signup-container {
    grid-area: signup;
  }

  .map-container {
    grid-area: map;
  }

  .more-listings {
    grid-area: more;
  }

  .map-container iframe {
    height: 100%;
    min-height: 500px;
  }
}
.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  max-height: 900px;
}
.more-listings {
  align-self: start;
}
@media (max-width: 1024px) {
  .more-listings {
    order: 5;
    margin-top: 1.5rem;
    width: 100% !important;
    grid-column: 1 / -1 !important;
  }
}
.more-listings {
  max-height: 450px;
  height: 450px;
  overflow-y: auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: left;
  box-sizing: border-box;
}

.content-grid > *:not(.agent-card):not(.more-listings) {
  display: flex;
  flex-direction: column;
}

.more-listings::-webkit-scrollbar {
  width: 5px;
}

.more-listings::-webkit-scrollbar-thumb {
  background-color: #a3cb3f82;
  border-radius: 4px;
}

@media (min-width: 1025px) {
  .content-grid.no-more-listings {
    display: grid;
    grid-template-areas:
      "business signup agent"
      "map map map";
    grid-template-columns: 2fr 2fr;
    place-items: center;
    max-width: 95%;
    margin: 2rem auto;
    gap: 1.5rem;
  }

  .content-grid.no-more-listings .map-container {
    grid-area: map;
    max-width: 900px;
    width: 100%;
    justify-self: center;
  }

  .content-grid.no-more-listings .more-listings {
    display: none !important;
  }
  .content-grid.no-agent {
    grid-template-columns: 2fr 2fr; /* Removes 3rd column */
    gap: 1.5rem;
  }
}

.business-card, .signup-container {
  grid-column: span 2;
}

.address{
  grid-column: span 2;
}
.more-listings{
  grid-column: span 1;
}

.mls-number {
  color: darkslategray;
  font-size: x-small;
}

.gallery-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

img {
  border-radius: 0.25rem;
}

@media (min-width: 769px) {
  .gallery-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: auto;
  }
}

@media (max-width: 768px) {
  .gallery-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

@media (max-width: 768px) {
  .content-grid { margin-top: 2rem !important; }
  .more-listings { margin-top: 0rem !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .content-grid { margin-top: 2rem !important; }
  .more-listings { margin-top: 0rem !important; }
}