/* Base page styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background-color: #BBE7D0;
    color: #083028;
}

/* Header styling */
header {
    text-align: center;
    padding: 20px;
}

header img {
    max-width: 120px;
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

/* Navigation bar */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #083028;
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #125C4D;
}

/* Main content box */
.estimator-box {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(8, 48, 40, 0.2);
    text-align: center;
}

.estimator-box h2 {
    margin-top: 0;
    font-size: 1.8em;
}

.button-group {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.button-group button {
    padding: 12px 20px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    background-color: #125C4D;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-group button:hover {
    background-color: #083028;
}

/* ADDED 10/02/2025 */

/* Center section titles */
h3 {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1.5em;
}

/* Center the form container */
form {
  max-width: 600px;
  margin: 0 auto;
}

/* Stack fields vertically and left-align labels */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

/* Form sections */
.form-section {
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

/* ADDED 10/03/2025 */

/* Center the page wrapper */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Support both .estimate-list and .gallery-grid layouts */
.estimate-list,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Gallery grid specifics */
.gallery-grid {
    gap: 30px;
    justify-items: center;
}

/* Gallery item / card styling */
.gallery-item,
.estimate-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    max-width: 400px;
    margin: 0 auto;
}

/* Image constraints */
.gallery-img,
.estimate-card img {
    width: 100%;
    aspect-ratio: 4 / 3; /* or 3 / 2 depending on your image shape */
    object-fit: cover;
    border-radius: 6px;
}

/* Helpers for image-heavy pages */
.image-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.full-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Details area */
.details-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.details {
    text-align: left;
    max-width: 600px;
    width: 100%;
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* No results */
.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Links */
.detail-link,
.clear-filters {
    color: #1a73e8;
    text-decoration: none;
}

.clear-filters:hover,
.detail-link:hover {
    text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 560px) {
  .filter-form { gap: 8px; }
  .page-wrapper { padding: 12px; }
  .gallery-grid,
  .estimate-list { grid-template-columns: 1fr; }
}

.section-title {
    font-weight: 600;
    font-size: 1.25rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 4px;
}
