/* ---------------------------
Base Styles
--------------------------- */
body {
  margin: 0;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #e9f5ec, #ffffff);
  color: #1f2933;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------------------------
Flex Utilities
--------------------------- */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------
Header
--------------------------- */
header {
  background: #ffffff;
  padding: 0.4rem 2rem; /* reduce top/bottom padding */
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem; /* optional: reduce horizontal spacing slightly */
}

/* Header nav links */
header nav a {
  text-decoration: none;
  color: #1f2933;
  font-weight: 600;
  padding: 0 0.5rem;
  position: relative;
}

header nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -3px;
  background: linear-gradient(to right, #14532d, #facc15);
  transition: width 0.3s ease;
}

header nav a:hover::after,
header nav a.active::after {
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
  margin-right: 1rem;
}

.logo-text .brand {
  font-weight: 700;
  font-size: 1.3rem;
  color: #14532d;
}

.logo-text .tagline-small {
  font-size: 0.9rem;
  color: #000000;
}

/* ---------------------------
Navigation (Header & Footer)
--------------------------- */
nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #1f2933;
  font-weight: 600;
  padding: 0 0.5rem;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -3px;
  background: linear-gradient(to right, #14532d, #facc15);
  transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

/* ---------------------------
Hero / Taglines — Final tightened spacing
--------------------------- */
.hero-logo-container {
  text-align: center;
  margin: 0.5rem 0 0.75rem; /* tighter top/bottom margins */
}

.hero-logo {
  max-width: 400px;
  width: 100%;
  height: auto;
}

.rotating-tagline {
  display: block;
  min-height: 2.25rem;      /* slightly smaller for tighter spacing */
  font-size: 1.5rem;        /* keeps proportions, slightly smaller */
  font-weight: 600;
  text-align: center;
  color: #14532d;
  opacity: 1;          		/* make it visible */
  margin-top: 0.2rem;       /* tighter gap between logo and tagline */
  transition: opacity 0.5s ease-in-out; /* optional fade effect */
  
    /* Fixed height for mobile */
  min-height: 3.5rem; /* enough for 2 wrapped lines on small screens */
  line-height: 1.2;
  overflow: hidden;      /* prevents extra growth */
  white-space: normal;   /* allows wrapping */
}

.fade-up {
  animation: fadeUp 1s forwards;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------------------------
Main Content
--------------------------- */
main {
  max-width: 900px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
  text-align: center;
}

.contact {
  margin-top: 2.5rem;
  padding: 2rem;
  background: #14532d;
  color: #ffffff;
  border-radius: 12px;
}

.contact h2 {
  margin-bottom: 1rem;
}

.contact a {
  color: #facc15;
  font-weight: bold;
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* ---------------------------
Footer
--------------------------- */
footer {
  background: #ffffff;
  padding: 1.5rem 2rem;
  text-align: center;
}

footer .container {
  display: flex;
  flex-direction: column; /* vertical stack for spacing */
  align-items: center;
  gap: 1rem; /* space between nav and copyright */
}

footer nav {
  display: flex;
  flex-wrap: wrap; /* keeps links horizontal but wraps if needed */
  justify-content: center;
  gap: 0.5rem;
}

footer nav a {
  text-decoration: none;
  color: #1f2933;
  font-weight: 600;
  padding: 0 0.5rem;
  position: relative;
}

footer nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -3px;
  background: linear-gradient(to right, #14532d, #facc15);
  transition: width 0.3s ease;
}

/* Footer underline on hover & current page */
footer nav a:hover::after,
body.page-home footer nav a[href="/index.shtml"]::after,
body.page-properties footer nav a[href="/properties.shtml"]::after,
body.page-owners footer nav a[href="/owners.shtml"]::after,
body.page-tenants footer nav a[href="/tenants.shtml"]::after,
body.page-contacts footer nav a[href="/contacts.shtml"]::after {
  width: 100%;
}

/* ---------------------------
Mobile Styles (Header + Footer)
--------------------------- */
@media (max-width: 768px) {

  /* -------- Header -------- */
  header {
    padding: 1rem;
  }

  header .container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* match footer container spacing */
  }

  .logo {
    justify-content: center;
    text-align: center;
  }

  .logo img {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  .logo-text {
    text-align: center;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;         /* allow wrapping if needed */
    justify-content: center; /* center links */
    column-gap: 1rem;        /* horizontal spacing like footer */
    row-gap: 0.25rem;        /* vertical spacing like footer */
  }

  header nav a {
    flex: initial;           /* natural width like footer links */
    text-align: center;
    padding: 0;              /* remove extra vertical padding */
    line-height: 1.4;        /* readable and clickable */
    position: relative;      /* ensures gradient underline aligns correctly */
    font-size: 0.95rem;
  }

  /* Gradient underline for header links (hover + active) */
  header nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: 0;
    background: linear-gradient(to right, #14532d, #facc15);
    transition: width 0.3s ease;
  }

  header nav a:hover::after,
  header nav a.active::after {
    width: 100%;
  }

  /* -------- Footer -------- */
  footer .container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* spacing between nav and copyright text */
  }

  footer nav {
    display: flex;
    flex-wrap: wrap;         /* allow links to wrap naturally */
    justify-content: center; /* center links on each row */
    column-gap: 1rem;        /* horizontal spacing between links */
    row-gap: 0.25rem;        /* vertical spacing between rows */
    /* remove width/max-width/margin so links don’t stack unnecessarily */
  }

  footer nav a {
    flex: initial;           /* natural width so underline matches text */
    text-align: center;
    padding: 0;              /* remove vertical padding pushing gradient down */
    line-height: 1.4;        /* keeps text readable and clickable */
    position: relative;      /* ensures gradient underline aligns correctly */
  }

  /* Gradient underline for footer links */
  footer nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    left: 0;
    bottom: 0;                /* flush with bottom of text */
    background: linear-gradient(to right, #14532d, #facc15);
    transition: width 0.3s ease;
  }

  footer nav a:hover::after,
  footer nav a.active::after {
    width: 100%;
  }

}
