:root {
  --font: Georgia, 'Times New Roman', Times, serif;
}

body {
  font-family: var(--font);
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  color: #333;
  line-height: 1.6;
}

.header {
  background-color: #2c3e50;
  color: #fff;
  padding: 15px 20px; /* Add horizontal padding for content */
  border-bottom: 3px solid #f39c12; /* Orange accent */

  /* === Flexbox for Vertical Alignment === */
  display: flex; /* Make header a flex container */
  justify-content: space-between; /* Push logo to left, nav to right */
  align-items: center; /* Vertically center items */
}

.logo {
  /* float: left; -- REMOVED due to flexbox */
  margin-left: 0; /* Remove previous float-related margin */
  color: #fff;
  text-decoration: none;
}

.logo h1 {
  margin: 0;
  font-size: 1.6em;
  letter-spacing: 1px;
}

.nav {
  /* float: right; -- REMOVED due to flexbox */
  margin-right: 0; /* Remove previous float-related margin */
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  /* Optional: If you want the menu items themselves to be spaced out or centered within the nav area */
  /* display: flex; */
  /* justify-content: center; */
}

.nav ul li {
  display: inline-block;
  margin-left: 20px;
}

.nav ul li a, .logo a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  transition: background-color 0s ease; /* Reduced transition for classic feel */
}

.nav ul li a:hover,
.nav ul li a.active {
  background-color: #f39c12; /* Orange on hover/active */
  border-radius: 3px;
}

.hero-image {
  width: 100%;
  height: 325px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the image covers the area without distortion */
  display: block;
}

.container {
  width: 90%;
  max-width: 1000px; /* Max width for content */
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap; /* Allows content and sidebar to wrap on smaller screens */
  border-radius: 4px;
}

.content {
  flex: 3; /* Takes 3 parts of available space */
  padding-right: 20px;
  box-sizing: border-box; /* Include padding in width calculation */
  min-width: 60%; /* Ensures content doesn't get too narrow */
}

.sidebar {
  flex: 1; /* Takes 1 part of available space */
  background-color: #f9f9f9;
  padding: 20px;
  border-left: 1px solid #eee;
  box-sizing: border-box;
  min-width: 250px; /* Ensures sidebar doesn't get too narrow */
  border-radius: 4px;
}

.content h2,
.sidebar h3 {
  color: #2c3e50;
  border-bottom: 2px solid #f39c12;
  padding-bottom: 5px;
  margin-top: 0;
}

.sidebar h3:nth-of-type(2),
.sidebar h3:nth-of-type(3) {
  margin-top: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.sidebar ul li {
  margin-bottom: 8px;
}

.sidebar ul li a,
.link, figcaption {
  color: #007bff;
  text-decoration: none;
}

.sidebar ul li a:hover {
  text-decoration: underline;
}

.contact-info p {
  margin: 5px 0;
  font-size: 0.95em;
}

.footer {
  background-color: #2c3e50;
  color: #fff;
  text-align: center;
  padding: 15px 0;
  margin-top: 20px;
  font-size: 0.9em;
  border-top: 3px solid #f39c12;
}

.footer p {
  margin: 5px 0;
}

/* Basic Responsiveness */
@media (max-width: 768px) {
  .header {
    flex-direction: column; /* Stack logo and nav vertically */
    align-items: center; /* Center items horizontally when stacked */
    padding: 15px 0; /* Adjust padding for stacked layout */
  }
  .logo,
  .nav {
    width: 100%;
    text-align: center; /* Center logo text and nav items when stacked */
    margin: 10px 0;
  }
  .nav ul li {
    margin: 0 10px; /* Adjust spacing for stacked nav */
  }
  .container {
    flex-direction: column;
  }
  .content,
  .sidebar {
    padding-right: 0;
    border-left: none;
    min-width: unset;
    width: 100%;
  }
  .sidebar {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
  }
}

/* --- Contact Page Specific Styles --- */

.contact-form {
  margin-top: 25px;
  padding: 20px;
  background-color: #fcfcfc;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
}

.contact-form h3 {
  color: #2c3e50;
  border-bottom: 1px solid #f39c12;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block; /* Make labels take full width for better spacing */
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.form-group input[type='text'],
.form-group input[type='email'],
.form-group textarea {
  width: calc(100% - 20px); /* Full width minus padding */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Georgia, 'Times New Roman', Times, serif; /* Match body font */
  font-size: 1em;
  box-sizing: border-box; /* Include padding in the element's total width and height */
}

.form-group textarea {
  resize: vertical; /* Allow vertical resizing only */
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #f39c12; /* Orange highlight on focus */
  outline: none; /* Remove default outline */
  box-shadow: 0 0 5px rgba(243, 156, 18, 0.5); /* Subtle shadow */
}

.submit-button {
  background-color: #f39c12; /* Orange */
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #e67e22; /* Darker orange on hover */
}

/* Styling for lists within the main content area */
/* This style is also generally useful for sidebar lists if you use the <ul> tag there */
.content ul,
.sidebar ul {
  list-style: disc;
  margin: 15px 0 15px 20px;
  /* Adjusting margin for sidebar list */
  padding: 0;
}

.content ul li,
.sidebar ul li {
  margin-bottom: 8px;
}

.footer,
.footer small {
  font-size: 0.9rem;
}

/* --- Directory Page Specific Styles --- */

/* ... (Keep existing .full-width-content and .search-container styles) ... */

/* Table Styling - Classic Look */
#business-directory {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95em;
  table-layout: fixed;
  /* Keep this to make column widths predictable */
}

#business-directory th,
#business-directory td {
  padding: 10px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

#business-directory th {
  background-color: #2c3e50;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 3px solid #f39c12;
}

/* === NEW RULE TO MAKE LISTING # COLUMN SMALLER === */
#business-directory th:nth-child(1) {
  width: 8%;
  /* Set the width of the first column to 8% */
  text-align: center;
  /* Center the number for better looks */
  padding-left: 5px;
  padding-right: 5px;
}

#business-directory th:nth-child(2) {
  width: 20%;
}

#business-directory th:nth-child(3)  {
  width: 12%;
}

/* ============================================== */

/* Subtle striping for readability */
#business-directory tr:nth-child(even) {
  background-color: #f9f9f9;
}

#business-directory tr:hover {
  background-color: #eee;
}

/* ... (Keep existing search input styles) ... */
/* Search Input Styling */
.search-container {
  margin: 20px 0;
  padding: 15px;
  border: 1px solid #ccc;
  background-color: #fff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 15px;
}

#search-input {
  padding: 8px 10px;
  border: 1px solid #999;
  border-radius: 4px;
  font-size: 1em;
  width: 100%;
  max-width: 400px;
  font-family: Georgia, 'Times New Roman', Times, serif;
}

#search-input:focus {
  border-color: #f39c12;
  outline: none;
}

img {
  max-width: 100%;
  border-radius: 2px;
}

.image-caption {
  margin-bottom: 25px;
  margin-top: 10px;
}

figure {
  margin:0;
}