/* ===============================
   Base & Reset
================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* ===============================
   Layout
================================ */

.container {
  max-width: 520px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Reduce space between header and main content */
main.container {
  margin-top: 20px;
}

/* ===============================
   Header (Ad-safe)
================================ */

.site-header {
  background: transparent;
  border-bottom: none;
  margin: 0;
  padding: 8px 0;
}

/* Reserved space for future ads */
.header-ad-slot {
  min-height: 0;         /* No ad yet */
  width: 100%;
}

/* Header inner */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 20px; /* matches container padding */
}

/* Logo */
.site-header img {
  height: 38px;
  width: auto;
}

/* ===============================
   Header spacing fix
================================ */

.site-header .container {
  margin: 0 auto;
}

/* Primary nav */
.primary-nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-nav .nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.primary-nav .nav-link:hover {
  background: #f1f5ff;
  text-decoration: none;
}

/* ===============================
   Typography
================================ */

h1 {
  text-align: center;
  font-size: 2rem;
  color: #1a73e8;
  margin-bottom: 10px;
}

h2 {
  color: #1a73e8;
  margin-top: 40px;
  margin-bottom: 15px;
}

h3 {
  color: #1a73e8;
  margin-top: 30px;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 10px 0;
}

.hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #777;
  text-align: center;
  font-style: italic;
}

.intro {
  text-align: center;
  margin-bottom: 30px;
  color: #555;
}

/* ===============================
   Forms & Inputs
================================ */

label {
  display: block;
  margin-bottom: 20px;
  font-weight: 600;
}

input[type="number"],
input[type="date"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

input:focus {
  outline: none;
  border-color: #1a73e8;
}

/* ===============================
   Results Box
================================ */

.result {
  margin-top: 25px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  font-size: 1.05rem;
}

.result p {
  margin: 8px 0;
}

/* ===============================
   Tool List (Homepage)
================================ */

.tools {
  margin-top: 40px;
}

.tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-list li {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.tool-list a {
  display: block;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.tool-list a:hover {
  background: #f1f5ff;
}

.tool-title {
  display: block;
  font-weight: 600;
}

.tool-description {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95em;
  color: #555;
}

/* ===============================
   Footer
================================ */

.site-footer {
  background: transparent;
  border-top: none;
  margin-top: 40px;
}

.site-footer .container {
  text-align: center;
  padding: 10px 0;
}

.footer-links {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 6px;
  line-height: 1.5;
}

.footer-links a {
  color: #777;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
}

/* ===============================
   Mobile
================================ */

@media (max-width: 400px) {
  .container {
    margin: 25px auto;
    padding: 0 15px;
  }

  h1 {
    font-size: 1.6rem;
  }
}

/* ===============================
   Mobile Header
================================ */

@media (max-width: 480px) {

  .header-inner {
    flex-direction: column;
    gap: 10px;
    padding: 6px 15px;
  }

  .site-header img {
    height: 32px;
  }

  .primary-nav {
      justify-content: center;
    }

    .primary-nav .nav-link {
      font-size: 0.9rem;
      padding: 6px 10px;
    }  
}

/* =========================
   Tool list grouping labels
   ========================= */

.tool-group {
  list-style: none;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
}

.tool-group + li {
  margin-top: 0.25rem;
}

.cta-banner {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: #f7f9fc;
  border-left: 3px solid #1a73e8;
  border-radius: 6px;
}

/* Normalize select styling to match inputs */
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #111;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Focus state to match inputs */
select:focus {
  outline: none;
  border-color: #111;
}

label {
  position: relative;
}

label select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
}

/* Normalize textarea styling to match inputs */
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  color: #111;
  line-height: 1.5;
  resize: vertical;
}

/* Focus state */
textarea:focus {
  outline: none;
  border-color: #111;
}

/* ===============================
   Property Caretaker Retainer Calculator
   Result display grid
================================ */

.pcr-result-headline {
  font-size: 1.2rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.pcr-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pcr-result-item {
  background: #f7f9fc;
  border-radius: 6px;
  padding: 10px 12px;
}

.pcr-result-label {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 4px;
}

.pcr-result-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a73e8;
}

.pcr-overage-example {
  background: #f7f9fc;
  border-left: 3px solid #1a73e8;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.breadcrumb a {
  color: #888;
  text-decoration: none;
}

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

/* Mobile: stack result grid to single column */
@media (max-width: 400px) {
  .pcr-result-grid {
    grid-template-columns: 1fr;
  }
}

/* Calculator section label (replaces H2 for input grouping) */
.calc-section-label {
  font-size: 1rem;
  font-weight: 700;
  color: #1a73e8;
  margin-top: 30px;
  margin-bottom: 4px;
}

/* ===============================
   Freelance Rate Calculator (Multi-Mode)
   Append to main.css
================================ */

/* Tab switcher */
.frc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0 24px;
}

.frc-tab-btn {
  flex: 1 1 auto;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: #4b5563;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
}

.frc-tab-btn:hover {
  background: #f1f5ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

.frc-tab-btn.active {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #fff;
}

/* Result grid — mirrors pcr-result-grid pattern */
.frc-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.frc-result-item {
  background: #f7f9fc;
  border-radius: 6px;
  padding: 10px 12px;
}

.frc-result-label {
  display: block;
  font-size: 0.78rem;
  color: #777;
  margin-bottom: 3px;
  line-height: 1.3;
}

.frc-result-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a73e8;
}

/* Section divider inside results */
.frc-section-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 14px 0;
}

/* Benchmark bar */
.frc-benchmark-bar {
  margin-top: 8px;
}

.frc-benchmark-track {
  position: relative;
  height: 10px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: visible;
  margin-bottom: 6px;
}

/* Highlighted range (low–high for role) */
.frc-benchmark-range {
  position: absolute;
  top: 0;
  height: 100%;
  background: #bfdbfe;
  border-radius: 10px;
}

/* Marker: user's rate position */
.frc-benchmark-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #1a73e8;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: left 0.2s ease;
}

/* Labels below bar */
.frc-benchmark-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #888;
  margin-top: 4px;
}

/* Mobile: stack result grid to single column */
@media (max-width: 400px) {
  .frc-result-grid {
    grid-template-columns: 1fr;
  }

  .frc-tab-btn {
    font-size: 0.82rem;
    padding: 8px 8px;
  }
}
