/* ==========================================================================
   CostMyYard - Professional Responsive Stylesheet
   - Non-Sticky Header (explicitly static/relative as requested)
   - Mobile & Desktop Responsive Grid
   - High-Speed Zero-External-Dependency Typography & Animations
   ========================================================================== */
:root {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --bg-navy: #1e3a8a;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --emerald: #059669;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.14);
  --radius: 14px;
  --max-w: 1260px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   TOP BAR & NON-STICKY HEADER (Explicitly position: relative, NOT sticky)
   ========================================================================== */
.top-announcement {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.top-announcement-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-badges {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.top-badge {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

.site-header {
  position: relative; /* Strictly NON-sticky as requested */
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo svg, .brand-logo img {
  height: 46px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  background: #f0f9ff;
  color: var(--primary);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-navy) 100%);
  color: #ffffff !important;
  padding: 0.55rem 1.05rem;
  border-radius: 9px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.mobile-menu-btn {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-main);
}

/* ==========================================================================
   HERO SECTION & ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(2, 132, 199, 0); }
}

.animate-up {
  animation: fadeInUp 0.55s ease-out both;
}

.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0c4a6e 100%);
  color: #ffffff;
  padding: 3.25rem 0;
  border-bottom: 4px solid var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(1.85rem, 3.5vw, 2.85rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: #38bdf8;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: 1.06rem;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.85rem 1rem;
  border-radius: 12px;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fbbf24;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #cbd5e1;
}

/* ==========================================================================
   ADSENSE SAFE PLACEMENT SLOTS (CLS-SAFE CONTAINERS)
   ========================================================================== */
.ad-slot-banner {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 1.5rem auto;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #64748b;
  font-size: 0.78rem;
}

.ad-slot-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.68rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   INTERACTIVE CALCULATOR WORKBENCH
   ========================================================================== */
.calc-section {
  padding: 2.5rem 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
}

.calc-card, .results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.results-card {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border: 2px solid #0284c7;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
  color: var(--text-main);
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  background: #f8fafc;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.range-slider {
  width: 100%;
  margin-top: 0.45rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.checkbox-card:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.result-total-box {
  background: rgba(2, 132, 199, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 1.35rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

.result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #bae6fd;
  font-weight: 700;
}

.result-price {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  color: #fbbf24;
  margin: 0.25rem 0;
}

.result-unit-rate {
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
}

.tier-range-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.tier-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.7rem 0.5rem;
  text-align: center;
}

.tier-box small {
  display: block;
  font-size: 0.74rem;
  color: #94a3b8;
}

.tier-box strong {
  font-size: 1.02rem;
  color: #ffffff;
}

.breakdown-list {
  list-style: none;
  margin-bottom: 1.25rem;
}

.breakdown-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.92rem;
}

.progress-bar-wrap {
  height: 12px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin: 0.75rem 0 1.25rem;
}

.bar-mat { background: #38bdf8; height: 100%; transition: width 0.35s ease; }
.bar-lab { background: #f59e0b; height: 100%; transition: width 0.35s ease; }
.bar-add { background: #10b981; height: 100%; transition: width 0.35s ease; }

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  flex: 1;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex: 1;
}

.btn:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   TOOLS DIRECTORY GRID & CARDS
   ========================================================================== */
.section-block {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2.25rem;
}

.section-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.section-title {
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.35rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.45rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.tool-icon {
  font-size: 1.85rem;
  background: #f0f9ff;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.market-pill {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.market-pill.uk {
  background: #dbeafe;
  color: #1e40af;
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.tool-meta-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ==========================================================================
   SEO / GEO / AEO CONTENT TABLES, WORKED EXAMPLES & FAQS
   ========================================================================== */
.aeo-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}

.aeo-box h2, .aeo-box h3 {
  font-size: 1.1rem;
  color: #0369a1;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.content-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.5rem 0 0.65rem;
  color: var(--bg-navy);
}

.content-card p {
  margin-bottom: 1rem;
  color: #334155;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--bg-dark);
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:nth-child(even) {
  background: #f8fafc;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #ffffff;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  display: block;
}

/* ==========================================================================
   FLOATING UP ⬆️ & DOWN ⬇️ SCROLL ARROWS
   ========================================================================== */
.scroll-arrows {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}

.scroll-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.scroll-btn:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 3.5rem 0 2rem;
  margin-top: 3rem;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #38bdf8;
}

.social-pills {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.social-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.social-pill:hover {
  background: var(--primary);
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid, .calc-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
  .main-nav.open {
    display: flex;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .hero-stats, .tier-range-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .content-card, .calc-card, .results-card {
    padding: 1.25rem;
  }
}

@media print {
  .top-announcement, .site-header, .scroll-arrows, .site-footer, .ad-slot-banner, .btn-row {
    display: none !important;
  }
  body { background: #ffffff; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
}
