/*
 * Peachline Bath & Design styles
 *
 * This stylesheet defines the look and feel for the Peachline Bath & Design
 * site. It uses a minimal, modern aesthetic with a blush/peach color palette,
 * charcoal/dark text on off‑white backgrounds. The design is mobile friendly
 * with a responsive navigation menu and modal dialog for the quote form.
 */

:root {
  /* Color palette */
  --peach: #f4d4c2;
  --peach-dark: #dba794;
  --charcoal: #2f2f2f;
  --off-white: #fdfbf9;
  --accent: #a76c5b;
  --error: #b00020;
  /* Spacing */
  --container-width: 1200px;
  --gutter: 1rem;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--off-white);
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header & Navigation */
.site-header {
  background-color: var(--off-white);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: bold;
  font-size: 1.25rem;
  color: var(--charcoal);
  text-decoration: none;
}

.navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.navigation li {
  margin: 0 0.75rem;
}

.navigation a {
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.navigation a:hover,
.navigation a:focus {
  color: var(--accent);
}

.cart-link {
  font-weight: bold;
}

.quote-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.quote-btn:hover,
.quote-btn:focus {
  background-color: var(--peach-dark);
}

/* Mobile navigation toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 24px;
  height: 2px;
  background-color: var(--charcoal);
  display: block;
}

/* Hero section */
.hero {
  position: relative;
  color: var(--off-white);
  text-align: center;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 2rem;
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2rem;
  line-height: 1.3;
  color: #fff;
}

.hero p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #f7f7f7;
}

/* Quick links */
.quick-links {
  background-color: var(--off-white);
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.link-card {
  display: block;
  background-color: var(--peach);
  color: var(--charcoal);
  padding: 1rem;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.link-card:hover,
.link-card:focus {
  background-color: var(--peach-dark);
}

/* Preview sections */
.preview {
  padding: 2rem 0;
  text-align: center;
}

.preview h2 {
  margin-bottom: 0.5rem;
  font-size: 1.6rem;
  color: var(--charcoal);
}

.preview p {
  margin-bottom: 0.75rem;
  color: var(--charcoal);
}

.preview .cta-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: bold;
}

.preview .cta-link:hover,
.preview .cta-link:focus {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background-color: var(--charcoal);
  color: var(--off-white);
  padding: 2rem 0;
  margin-top: 2rem;
}

.site-footer h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.site-footer p,
.site-footer ul {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer ul {
  list-style: none;
  padding-left: 0;
}

.site-footer li {
  margin-bottom: 0.25rem;
}

.site-footer a {
  color: var(--peach);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1rem;
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #ccc;
}

/* Modal styles */
/*
 * Modal overlay
 *
 * The quote estimator uses a modal that overlays the entire page.  To ensure
 * the dialog is legible on top of other elements (such as the sticky
 * header or hero overlay), the modal’s z‑index is set very high.  A
 * semi‑transparent black background helps the content stand out without
 * obscuring the dialog itself.  Overflow on the Y axis is enabled so the
 * form can scroll independently on smaller screens.
 */
.modal {
  /* Hidden by default; shown when the `.show` class is applied via JS */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 1rem;
  /* Raise the overlay above all page content */
  z-index: 2000;
}

.modal.show {
  display: flex;
}

/*
 * Modal content
 *
 * The dialog itself needs to sit above the overlay.  A slightly higher
 * z‑index ensures it’s always visible.  The max‑width keeps the form
 * comfortable to read on large screens, while still responsive on
 * smaller devices.
 */
.modal-content {
  background: var(--off-white);
  padding: 1.5rem;
  border-radius: 6px;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 2001;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.modal-content label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content input[type="number"],
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.modal-content input[type="file"] {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.modal-content .services-section {
  margin-bottom: 1rem;
}

.services-section legend {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.checkboxes label {
  display: block;
  margin-bottom: 0.25rem;
  cursor: pointer;
}

.consent {
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.required {
  color: var(--error);
}

.estimate-output {
  background-color: var(--peach);
  color: var(--charcoal);
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: none;
}

.submit-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.submit-btn:hover,
.submit-btn:focus {
  background-color: var(--peach-dark);
}

.close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--charcoal);
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navigation {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background-color: var(--off-white);
    border-top: 1px solid #eee;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }
  .navigation.open {
    transform: translateY(0);
  }
  .navigation ul {
    flex-direction: column;
    padding: 1rem 0;
  }
  .navigation li {
    margin: 0.5rem 0;
    text-align: center;
  }
  .menu-toggle {
    display: flex;
  }
  /* Always show the quote button on small screens so mobile users can access the estimator */
  .quote-btn {
    display: inline-block;
    margin-top: 0.5rem;
  }
}

/* When a modal is open, prevent body from scrolling */
/*
 * When a modal is open we lock scrolling on the `<body>` element.  Using
 * `!important` ensures that this rule wins against any inline styles or
 * other overflow definitions.  Setting a fixed height prevents mobile
 * browsers from still allowing the page to scroll beneath the modal.
 */
body.modal-open {
  overflow: hidden !important;
  height: 100vh;
  /* Prevent the underlying page from scrolling on mobile and desktop */
  position: fixed;
  width: 100%;
}

/* Contact page specific layout and styling */
.contact-section {
  padding: 2rem 0;
}

/* Two-column layout for the contact page. On wider screens the info and form sit side by side; on small screens they stack. */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-info,
.contact-form-container {
  flex: 1 1 300px;
}

.contact-info h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Form heading styling on contact page */
.contact-form-container h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/*
 * Contact details list styling
 * Display a simple disc bullet for each line, matching the reference layout. By default
 * browsers indent unordered lists; we explicitly set padding-left to control the spacing
 * and remove any additional margin. Each list item has a bit of spacing beneath it
 * for readability.
 */
.contact-details {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0;
}

.contact-details li {
  margin-bottom: 0.5rem;
}

/* Form styling for the contact page */
.contact-form-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container input[type="tel"],
.contact-form-container textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  background-color: #fff;
  color: var(--charcoal);
}

.contact-form-container .consent {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: block;
}

/* Button styling for the contact page form */
.contact-form-container .submit-btn {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.contact-form-container .submit-btn:hover,
.contact-form-container .submit-btn:focus {
  background-color: var(--peach-dark);
}