/**
 * Grit City shared styles
 * Use for Grit City Home Services and Grit City Sheds (and future properties).
 * Load after Bootstrap: <link href="gritcity.css" rel="stylesheet">
 * See brand.md for full guidelines.
 */

/* ==========================================================================
   Brand colors (change once here to update everywhere)
   ========================================================================== */

:root {
  /* Primary */
  --grit-primary: #1f3b2e;
  --grit-primary-hover: #2c6c4a;

  /* Backgrounds */
  --grit-bg-page: #fffdf6;
  --grit-bg-section: #fffef8;
  --grit-bg-hero: #fefcf5;
  --grit-bg-card: #fefcf5;
  --grit-bg-tint: #f4f7f5;
  --grit-bg-soft: #eaf1ec;
  --grit-bg-accordion-open: #d4e8dd;
  --grit-bg-table-header: #e5eee8;
  --grit-white: #ffffff;

  /* Text */
  --grit-text: #123524;
  --grit-text-muted: #333;
  --grit-text-secondary: #555;
  --grit-text-tertiary: #666;

  /* Borders */
  --grit-border: #d9d9d9;
  --grit-border-pill: #c3d9cc;
  --grit-border-thumb: #ccc;
  --grit-border-step: #ddd;

  /* Shadows */
  --grit-shadow-card: 0 0 20px rgba(0, 0, 0, 0.05);
  --grit-shadow-card-strong: 0 0 20px rgba(0, 0, 0, 0.1);
  --grit-shadow-cta: 0 8px 16px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.2);
  --grit-shadow-cta-hover: 0 12px 24px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.25);
  --grit-shadow-cta-active: 0 4px 10px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Layout: sticky footer
   ========================================================================== */

html {
  scrollbar-gutter: stable;
}

html,
body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--grit-bg-page);
  color: var(--grit-text);
}

.content-wrapper {
  flex: 1 0 auto;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  background-color: var(--grit-primary);
}

.navbar-brand {
  color: var(--grit-white) !important;
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-nav .nav-link {
  color: var(--grit-white) !important;
  font-weight: 500;
}

.nav-link:hover {
  font-weight: bold;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  text-align: center;
  padding: 80px 20px 40px;
  background-color: var(--grit-bg-hero);
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--grit-primary);
}

.hero .shed-illustration {
  max-width: 300px;
  width: 100%;
  margin-bottom: 20px;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section,
.service-area {
  padding: 60px 20px;
}

.section {
  background-color: var(--grit-bg-section);
}

.service-area {
  background-color: var(--grit-bg-tint);
}

.service-area h3 {
  margin-bottom: 20px;
  text-align: center;
}

.section.text-center {
  text-align: center;
}

.section-content {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  min-width: 0;
}

.section h2,
.service-area h3 {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--grit-primary);
}

.section h2 {
  margin-bottom: 16px;
}

.section p,
.lead-text {
  color: var(--grit-text-muted);
  max-width: 700px;
  margin: 0 auto;
}

.section p {
  font-size: 1rem;
}

/* ==========================================================================
   Headings
   ========================================================================== */

.highlighted-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--grit-primary);
  margin-bottom: 20px;
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.7;
}

.subheading {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Primary CTA button / link
   ========================================================================== */

.cta {
  background-color: var(--grit-primary);
  color: var(--grit-white);
  padding: 16px 24px;
  border-radius: 6px;
  font-size: 1.25rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 20px;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.4;
  position: relative;
  top: 0;
  box-shadow: var(--grit-shadow-cta);
  transition: all 0.15s ease-in-out;
}

.cta:hover,
.cta:focus {
  background-color: var(--grit-primary-hover);
  color: var(--grit-white);
  box-shadow: var(--grit-shadow-cta-hover);
  transform: translateY(-3px);
}

.cta:active {
  transform: translateY(1px);
  box-shadow: var(--grit-shadow-cta-active);
}

/* Form submit: match brand green (use with Bootstrap .btn .btn-success) */
.btn-success {
  background-color: var(--grit-primary);
  border-color: var(--grit-primary);
}

.btn-success:hover {
  background-color: var(--grit-primary-hover);
  border-color: var(--grit-primary-hover);
}

/* ==========================================================================
   Cards & panels
   ========================================================================== */

/* Shared card panel (custom-card, iframe-card) */
.custom-card,
.iframe-card {
  background-color: var(--grit-bg-card);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--grit-border);
  box-shadow: var(--grit-shadow-card);
  height: 100%;
}

.custom-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.custom-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  margin-bottom: 15px;
}

.custom-card h5 {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--grit-primary);
}

.custom-card p {
  font-size: 1rem;
  color: var(--grit-text-muted);
  margin-top: auto;
}

/* Home page service category cards: same look as About Us card on contact page */
.service-category-cards .custom-card {
  background-color: var(--grit-bg-soft);
  border: none;
  border-top: 5px solid var(--grit-primary);
  border-radius: 6px;
  box-shadow: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.service-category-cards .custom-card h5 {
  margin-bottom: 0.5rem;
}

.service-category-cards .custom-card p {
  margin-top: 0;
}

.service-category-cards a:hover .custom-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Category page service cards: same background as About Us card, no border */
.category-service-cards .custom-card {
  background-color: var(--grit-bg-soft);
  border: none;
  box-shadow: none;
}

.category-service-cards .custom-card h5 {
  margin-bottom: 0.5rem;
}

.category-service-cards .custom-card p {
  margin-top: 0;
}

/* Accent / info blocks (about, contact details, CTA banner) */
.contact-details,
.about-card,
.cta-banner {
  background-color: var(--grit-bg-soft);
  border-left: 5px solid var(--grit-primary);
  padding: 20px;
  border-radius: 6px;
}

.about-card h5 {
  font-weight: bold;
  color: var(--grit-primary);
  margin-bottom: 10px;
}

.cta-banner {
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--grit-primary);
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-details {
  margin-top: 20px;
}

/* Sidebar CTA card (e.g. Features page left column) */
.sidebar-cta {
  background-color: var(--grit-primary);
  color: var(--grit-white);
  padding: 24px;
  border-radius: 8px;
  box-shadow: var(--grit-shadow-card-strong);
}

.sidebar-cta h5,
.cta-horizontal-text h5 {
  color: var(--grit-white);
  font-weight: 700;
  font-size: 1.15rem;
}

.sidebar-cta h5 {
  margin-bottom: 12px;
}

.sidebar-cta p,
.cta-horizontal-text p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.sidebar-cta p {
  margin-bottom: 16px;
}

.cta-horizontal-text p {
  margin: 0;
}

.sidebar-cta a {
  color: var(--grit-white);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 8px;
}

.sidebar-cta a:hover {
  color: var(--grit-white);
  text-decoration: underline;
}

.sidebar-cta .cta-button,
.cta-horizontal .cta-button {
  background-color: var(--grit-primary-hover);
  color: var(--grit-white);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-cta .cta-button {
  display: block;
  text-align: center;
  margin-top: 12px;
}

.sidebar-cta .cta-button:hover,
.cta-horizontal .cta-button:hover {
  background-color: var(--grit-bg-accordion-open);
  color: var(--grit-primary);
  text-decoration: none;
}

/* Horizontal CTA bar (e.g. below Photos gallery) */
.cta-horizontal-wrapper {
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.cta-horizontal {
  background-color: var(--grit-primary);
  color: var(--grit-white);
  padding: 24px 28px;
  border-radius: 8px;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 28px;
}

.cta-horizontal-text h5 {
  margin-bottom: 4px;
}

.cta-horizontal .cta-button {
  display: inline-block;
  text-align: center;
  margin-top: 0;
  flex-shrink: 0;
}

.iframe-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 0.75rem;
}

.badge.badge-brand {
  background-color: var(--grit-primary-hover);
  color: var(--grit-white);
}

/* ==========================================================================
   Price table
   ========================================================================== */

.price-table-container {
  background-color: var(--grit-bg-card);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--grit-shadow-card-strong);
  max-width: 85%;
  margin-top: 10px;
}

.price-table-container h3 {
  color: var(--grit-primary);
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.price-disclaimer {
  font-size: 0.875rem;
  color: var(--grit-text-tertiary);
  margin-bottom: 15px;
  font-style: italic;
}

.price-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background-color: var(--grit-white);
  color: var(--grit-text);
}

.price-table th,
.price-table td {
  padding: 12px 16px;
  border: 1px solid var(--grit-border);
  text-align: center;
}

.price-table th {
  background-color: var(--grit-bg-table-header);
  font-weight: 600;
}

/* ==========================================================================
   Accordion (FAQ)
   ========================================================================== */

.faq-accordion {
  width: 100%;
  max-width: 575px;
  margin: 30px auto 0;
  min-width: 0;
}

.accordion-button {
  font-weight: 600;
  background-color: var(--grit-bg-soft);
  color: var(--grit-text);
  transition: background-color 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background-color: var(--grit-bg-accordion-open);
  color: var(--grit-primary);
}

.accordion-body {
  text-align: left;
  background-color: var(--grit-white);
}

/* ==========================================================================
   Step indicator (numbered steps)
   ========================================================================== */

.step-row {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  border-bottom: 1px solid var(--grit-border-step);
}

.step-row:nth-of-type(odd) {
  background-color: var(--grit-bg-soft);
}

.step-row:nth-of-type(even) {
  background-color: var(--grit-bg-tint);
}

.step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background-color: var(--grit-primary);
  color: var(--grit-white);
  font-weight: bold;
  font-size: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  margin-top: 6px;
}

.step-description {
  flex-grow: 1;
  font-size: 1rem;
}

/* ==========================================================================
   Service area / tags (pills)
   ========================================================================== */

.service-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  font-weight: 500;
  color: var(--grit-primary);
}

.service-list span {
  background-color: var(--grit-bg-soft);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--grit-border-pill);
}

/* ==========================================================================
   TOC (table of contents)
   ========================================================================== */

.sidebar-sticky {
  position: sticky;
  top: 80px;
}

.toc {
  background-color: var(--grit-bg-soft);
  padding: 20px;
  border-radius: 6px;
}

.toc a {
  display: block;
  margin-bottom: 10px;
  color: var(--grit-primary);
  font-weight: 500;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.gallery {
  padding: 20px;
}

.gallery img {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* Shingle/option thumbnails (e.g. Features) */
.shingle-thumbnails img.shingle-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--grit-border-thumb);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s;
}

.shingle-thumbnails img.shingle-thumb:hover {
  transform: scale(1.1);
  border-color: var(--grit-primary);
}

/* ==========================================================================
   Forms
   ========================================================================== */

label {
  font-weight: 500;
}

.input-group-text {
  background-color: var(--grit-bg-soft);
  border: none;
}

.input-group .form-control {
  border-left: none;
}

.input-group .form-control:focus {
  box-shadow: none;
}

.form-note {
  font-size: 0.9rem;
  color: var(--grit-text-secondary);
  margin-top: 10px;
}

.alert {
  margin-top: 15px;
}

/* ==========================================================================
   Footer (sticky)
   ========================================================================== */

footer {
  background-color: var(--grit-primary);
  color: var(--grit-white);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Utilities / one-offs (optional)
   ========================================================================== */

.left-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.booking-section {
  display: flex;
  align-items: stretch;
}

.left-section,
.right-section {
  display: flex;
  flex-direction: column;
}

.left-section {
  flex: 1;
  justify-content: flex-start;
}

.right-section {
  flex: 1;
}

@media (min-width: 992px) {
  .row.align-items-stretch {
    align-items: start !important;
  }
}

.modal-img {
  width: 100%;
  border-radius: 6px;
}
