/* Basic Reset and Body Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: url(/assets/pexels-alexander-mass-748453803-27638198.jpg) no-repeat center center fixed;
  background-size: cover;
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevents horizontal scroll from absolute positioned elements */
  font-size: 17px;
}

/* Header Styles */
header {
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  text-align: center; /* Default for larger screens */
  color: #fff;
  font-size: 2.2em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  display: flex; /* Always flex now for consistent alignment */
  justify-content: center; /* Center h1 on large screens */
  align-items: center;
  position: relative; /* For absolute positioning of nav-links later if needed */
}

header h1 {
    margin: 0; /* Remove default margin for consistent flex alignment */
}

/* Hamburger Icon Styles (Hidden by default on large screens) */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    color: white;
    z-index: 1001; /* Ensure it's clickable above other content */
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

/* Navbar Container Styles */
.navbar {
  background: rgba(0, 0, 0, 0.75);
  padding: 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  color: white;
  display: block; /* Default to block on large screens */
  width: 100%;
}

/* Navigation Links (Default: horizontal on large screens) */
.navbar .nav-links {
  list-style-type: none;
  display: flex; /* Horizontal on large screens */
  justify-content: center;
  gap: 27px;
  margin: 0;
  padding: 10px 0;
  width: 100%;
}

.navbar a {
  text-decoration: none;
  color: #f0f0f0;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
  font-size: 1.1em;
}

.navbar a:hover,
.navbar a:focus {
  background: rgba(255, 255, 255, 0.2);
}

/* MAIN CONTENT AREA STYLING */
main {
  flex: 1; /* Allows main content to grow and push footer down */
  background: rgba(0, 0, 0, 0.6);
  padding: 30px;
  margin: 20px auto;
  border-radius: 12px;
  max-width: 900px;
  width: calc(100% - 40px); /* Ensures a little margin on very small screens */
  color: #fff;
  line-height: 1.6;
  font-size: 1.05em;
}

/* Specific main styling for multi-form pages if applicable */
main.multi-form-page-main {
  background: none;
  padding: 20px;
}

.report-section {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  margin: 20px auto;
  width: calc(100% - 40px);
}

main h2, main h3, main h4 { /* Added h4 to general main headings */
    font-size: 1.7em;
    margin-bottom: 15px;
    color: #f0f0f0;
}

/* Form Element Styles */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="file"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: white;
  color: black;
  font-size: 1.05em;
}

label {
    font-size: 1.05em;
    margin-bottom: 5px;
    display: block;
}

button {
  background-color: #28a745;
  color: white;
  font-size: 1.05rem;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #218838;
}

.btn-report { /* Specific button style */
    background-color: #007bff;
    color: white;
    font-size: 1.05rem;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.btn-report:hover {
    background-color: #0056b3;
}

form {
  max-width: 700px;
  margin: auto;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Site Footer Styling */
.site-footer {
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 30px 20px;
  font-size: 0.95em;
  border-top: 1px solid rgba(46, 204, 113, 0.2);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: auto;
  gap: 20px;
}

.footer-left h4 {
  color: rgba(39, 174, 96, 0.8);
  margin-bottom: 8px;
  font-size: 1.2em;
}

.footer-left p,
.footer-right p {
  margin: 5px 0;
  color: white;
}

.footer-right a {
  color: #add8e6;
  text-decoration: none;
  padding: 2px 5px;
  border-radius: 3px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-right a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: underline;
}

/* Specific Link Group Styles */
.management-links,
.court-links,
.leasing-links {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  list-style-type: none;
  margin: 20px auto;
  width: calc(100% - 40px);
}

.management-links li,
.court-links li,
.leasing-links li {
  margin: 10px 0;
}

.management-links a,
.court-links a,
.leasing-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 1.05em;
  display: block;
  padding: 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.management-links a {
  background-color: #007bff;
}
.management-links a:hover {
  background-color: #0056b3;
}

.court-links a {
  background-color: #dc3545;
}
.court-links a:hover {
  background-color: #c82333;
}

.leasing-links a {
  background-color: #17a2b8;
}
.leasing-links a:hover {
  background-color: #138496;
}

/* Responsive Design Adjustments */

/* For larger tablets and smaller laptops */
@media (max-width: 1024px) {
  body {
    font-size: 16.5px;
  }
  header {
    font-size: 2em;
  }
  main {
    padding: 25px;
    margin: 15px auto;
    width: calc(100% - 30px);
    font-size: 1em;
  }
  main.multi-form-page-main {
      padding: 15px;
  }
  main h2, main h3, main h4 {
      font-size: 1.6em;
  }
  input[type="text"], input[type="number"], input[type="email"], input[type="file"],
  input[type="tel"], input[type="date"], input[type="password"], select, textarea, label {
      font-size: 1em;
      padding: 10px;
  }
  button, .btn-report {
      font-size: 1rem;
      padding: 10px 18px;
  }
  .report-section {
    padding: 15px;
    margin: 15px auto;
    width: calc(100% - 30px);
    font-size: 1em;
  }
  .management-links,
  .court-links,
  .leasing-links {
    padding: 15px;
    margin: 15px auto;
    width: calc(100% - 30px);
    font-size: 1em;
  }
}

/* For smaller tablets and larger phones */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  header {
    font-size: 1.8em;
    display: flex;
    justify-content: flex-start; /* Aligns hamburger and title to the left */
    align-items: center;
    gap: 15px; /* Space between hamburger and title */
    padding: 20px;
  }
  header h1 {
    margin: 0;
    font-size: 1em; /* Reduce font size on smaller screens */
    /* text-align: left; - handled by flex-start now */
  }

  /* Show hamburger menu on small screens */
  .hamburger-menu {
    display: block; /* Hamburger becomes visible */
    position: static; /* It flows naturally with flexbox */
  }

  /* Navigation Links (Vertical dropdown for small screens) */
  .navbar .nav-links {
    display: none; /* Hidden by default on small screens */
    flex-direction: column; /* Stacks links vertically */
    width: 100%;
    position: absolute; /* Positions dropdown relative to body/viewport */
    top: 90px; /* Adjust this to sit below your header. May need fine-tuning. */
    left: 0;
    background: rgba(0, 0, 0, 0.95); /* Darker background for dropdown */
    padding: 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 999; /* Below hamburger, but above most content */
    overflow: hidden; /* Hides content when max-height is 0 */
    max-height: 0; /* Starts collapsed */
    transition: max-height 0.3s ease-out; /* Smooth transition for opening/closing */
  }

  /* When menu is active (toggled by JS) */
  .navbar .nav-links.active {
    display: flex; /* Becomes visible */
    max-height: 300px; /* Expands to show content (adjust as needed) */
    overflow-y: auto; /* Allows scrolling if menu items exceed max-height */
  }

  .navbar ul li {
    width: 100%;
    margin: 0;
    text-align: center;
  }

  .navbar a {
    padding: 12px 20px;
    font-size: 1.1em;
    width: 100%;
    border-radius: 0; /* Full width links in dropdown */
  }
  .navbar a:hover, .navbar a:focus {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Main content adjustments for this breakpoint */
  main {
    padding: 20px;
    margin: 10px auto;
    width: calc(100% - 20px);
    font-size: 0.95em;
  }
  main.multi-form-page-main {
      padding: 10px;
  }
  main h2, main h3, main h4 {
      font-size: 1.5em;
      margin-bottom: 10px;
  }
  input[type="text"], input[type="number"], input[type="email"], input[type="file"],
  input[type="tel"], input[type="date"], input[type="password"], select, textarea, label {
      font-size: 0.95em;
      padding: 8px;
  }
  button, .btn-report {
      font-size: 0.95rem;
      padding: 10px 16px;
      margin-top: 10px;
  }
  textarea {
      min-height: 80px;
  }

  /* Specific link group adjustments */
  details { /* Assuming you have a details element somewhere */
    padding: 15px;
    margin: 10px auto;
    width: calc(100% - 20px);
  }
  .report-section {
    padding: 15px;
    margin: 10px auto;
    width: calc(100% - 20px);
    font-size: 0.95em;
  }
  .management-links,
  .court-links,
  .leasing-links {
    padding: 15px;
    margin: 10px auto;
    width: calc(100% - 20px);
    font-size: 0.95em;
  }

  .site-footer {
    padding: 20px 15px;
    font-size: 0.9em;
  }
  .footer-left h4 {
    font-size: 1.1em;
  }
}

/* For small mobile phones */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    /* padding: 5px; - removed as main handles width */
  }

  header {
    font-size: 1.5em;
    padding: 15px;
  }
  header h1 {
    font-size: 1.3em;
  }

  .navbar {
      width: 100%;
  }

  .navbar a {
    font-size: 0.9em;
    padding: 8px 12px;
    margin: 5px 0;
  }

  main {
    padding: 15px;
    margin: 5px auto;
    width: calc(100% - 10px);
    font-size: 0.9em;
  }
  main.multi-form-page-main {
      padding: 5px;
  }
  main h2, main h3, main h4 {
      font-size: 1.2em;
      margin-bottom: 8px;
  }
  input[type="text"], input[type="number"], input[type="email"], input[type="file"],
  input[type="tel"], input[type="date"], input[type="password"], select, textarea, label {
      font-size: 0.9em;
      padding: 8px;
      margin: 8px 0;
  }
  button, .btn-report {
      font-size: 0.85rem;
      padding: 8px 12px;
  }
  textarea {
      min-height: 60px;
  }

  details {
    padding: 10px;
    margin: 10px auto;
    width: calc(100% - 10px);
  }
  .report-section {
    padding: 10px;
    margin: 10px auto;
    width: calc(100% - 10px);
    font-size: 0.9em;
  }
  .management-links,
  .court-links,
  .leasing-links {
    padding: 10px;
    margin: 10px auto;
    width: calc(100% - 10px);
    font-size: 0.9em;
  }

  .site-footer {
    padding: 15px 10px;
    font-size: 0.85em;
  }
  .footer-left h4 {
    font-size: 1em;
  }
}