/*
Theme Name: Blocksy IntermittFast
Template: blocksy
Version: 1.0.0
Description: Brand child theme for IntermittFast.com
*/

body,
.ct-container,
.ct-header,
.ct-footer {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root {
  --if-violet: #4c1d95;
  --if-violet-hover: #5b21b6;
  --if-charcoal: #1f2937;
  --if-green: #16a34a;
  --if-green-soft: #dcfce7;
  --if-surface: #f9fafb;
  --if-border: #e5e7eb;
  --if-text: #374151;
}

/* Hero */
.if-hero {
  background: var(--if-surface);
  border-bottom: 1px solid var(--if-border);
  padding: 4rem 1.5rem;
}
.if-hero h1 {
  color: var(--if-charcoal);
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  max-width: 720px;
}
.if-hero .if-lead {
  color: var(--if-text);
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 640px;
}
.if-trust-strip {
  background: #fff;
  border-bottom: 1px solid var(--if-border);
  padding: 0.875rem 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--if-text);
  letter-spacing: 0.02em;
}

/* Category cards */
.if-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.if-cat-card {
  background: #fff;
  border: 1px solid var(--if-border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}
.if-cat-card:hover {
  border-color: var(--if-violet);
}
.if-cat-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--if-charcoal);
}
.if-cat-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--if-text);
  line-height: 1.5;
}
.if-cat-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Section spacing */
.if-section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.if-section--alt {
  background: var(--if-surface);
}
.if-section h2 {
  color: var(--if-charcoal);
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
}

/* Comparison table (affiliate) */
.if-compare-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.if-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 640px;
}
.if-compare-table th,
.if-compare-table td {
  border: 1px solid var(--if-border);
  padding: 0.875rem 1rem;
  text-align: left;
  vertical-align: top;
}
.if-compare-table thead th {
  background: var(--if-charcoal);
  color: #fff;
  font-weight: 600;
}
.if-compare-table tbody tr:nth-child(even) {
  background: var(--if-surface);
}
.if-compare-table .if-pick {
  background: var(--if-green-soft);
  font-weight: 600;
  color: #14532d;
}
.if-compare-table .if-verdict {
  font-size: 0.8125rem;
  color: var(--if-text);
}
.if-disclosure {
  font-size: 0.8125rem;
  color: var(--if-text);
  border-left: 3px solid var(--if-green);
  padding: 0.75rem 1rem;
  background: var(--if-surface);
  margin: 1rem 0;
}

/* Start Here */
.if-start-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.if-start-steps li {
  counter-increment: step;
  border: 1px solid var(--if-border);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  margin-bottom: 1rem;
  position: relative;
  background: #fff;
}
.if-start-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--if-violet);
  color: #fff;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.if-deals-callout {
  border: 1px solid var(--if-border);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--if-surface);
  margin-top: 2rem;
}

/* Buttons override */
.wp-block-button__link.if-btn-primary {
  background: var(--if-violet) !important;
  border-radius: 6px;
}
.wp-block-button__link.if-btn-secondary {
  background: transparent !important;
  color: var(--if-violet) !important;
  border: 2px solid var(--if-violet) !important;
  border-radius: 6px;
}

/* Blocksy global accents */
a {
  color: var(--if-violet);
}
a:hover {
  color: var(--if-violet-hover);
}
.ct-header .ct-menu-link:hover,
.ct-header .current-menu-item > .ct-menu-link {
  color: var(--if-violet);
}
.ct-header-search.ct-toggle {
  color: var(--if-charcoal);
}
.ct-header-search.ct-toggle:hover {
  color: var(--if-violet);
}

/* Legal pages + footer (matches Top Deals layout) */
footer#footer.ct-footer {
  display: none !important;
}
.if-legal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 18px 16px 22px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.if-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 8px;
}
.if-legal-footer a {
  font-size: 0.8125rem;
  color: #64748b;
  text-decoration: none;
}
.if-legal-footer a:hover {
  color: #0f172a;
  text-decoration: underline;
}
.if-legal-footer p {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}
.td-legal-document,
.if-legal-document {
  max-width: 720px;
  margin: 0 auto;
}
.td-legal-document h2,
.if-legal-document h2 {
  color: var(--if-charcoal);
  margin-top: 2rem;
}
.td-legal-document h2:first-child,
.if-legal-document h2:first-child {
  margin-top: 0;
}

/* Impressum — compact legal typography */
.page-impressum .entry-content,
.page-impressum .td-legal-document {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #4b5563;
}
.page-impressum .td-legal-document h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--if-charcoal);
}
.page-impressum .td-legal-document h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.375rem;
  color: var(--if-charcoal);
}
.page-impressum .td-legal-document p {
  margin: 0 0 0.625rem;
}
.page-impressum .entry-header .page-title,
.page-impressum .entry-header .entry-title {
  font-size: 1.25rem;
}

/* Tools section */
.if-tool-wrap {
  max-width: 520px;
  margin: 0 auto 2rem;
}
.if-tool-card {
  background: #fff;
  border: 1px solid var(--if-border);
  border-radius: 8px;
  padding: 1.5rem;
}
.if-tool-units {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.if-tool-unit-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1px solid var(--if-border);
  border-radius: 6px;
  background: var(--if-surface);
  color: var(--if-text);
  cursor: pointer;
}
.if-tool-unit-btn.active {
  background: var(--if-violet);
  border-color: var(--if-violet);
  color: #fff;
  font-weight: 600;
}
.if-tool-field {
  margin-bottom: 1rem;
}
.if-tool-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--if-charcoal);
  margin-bottom: 0.375rem;
}
.if-tool-field input,
.if-tool-field select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--if-border);
  border-radius: 6px;
  box-sizing: border-box;
}
.if-tool-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.if-tool-calc-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  background: var(--if-violet);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.5rem;
}
.if-tool-calc-btn:hover {
  background: var(--if-violet-hover);
}
.if-tool-result {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 6px;
  background: var(--if-surface);
  border: 1px solid var(--if-border);
}
.if-tool-result-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--if-charcoal);
  margin: 0 0 0.25rem;
}
.if-tool-result-category {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--if-violet);
}
.if-tool-result-note {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--if-text);
  margin: 0;
}
.if-tool-disclaimer {
  font-size: 0.8125rem;
  color: var(--if-text);
  line-height: 1.55;
  margin: 1rem 0 0;
}
.if-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.if-tools-card {
  border: 1px solid var(--if-border);
  border-radius: 8px;
  padding: 1.25rem;
  background: #fff;
}
.if-tools-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--if-charcoal);
}
.if-tools-card p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--if-text);
  line-height: 1.5;
}
.if-tools-card a {
  font-size: 0.875rem;
  font-weight: 600;
}
.if-tool-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--if-border);
}
.if-tool-links h2 {
  font-size: 1.125rem;
  margin: 0 0 0.75rem;
  color: var(--if-charcoal);
}
.if-tool-links ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.7;
  color: var(--if-text);
  font-size: 0.9375rem;
}
.if-tool-panel[hidden] {
  display: none !important;
}

.if-tool-wrap-wide {
  max-width: 640px;
}
.if-meal-split {
  margin-top: 0.75rem;
}
.if-meal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--if-border);
  font-size: 0.9375rem;
}
.if-meal-row:last-child {
  border-bottom: none;
}
.if-meal-row strong {
  color: var(--if-charcoal);
}
.if-meal-row span {
  color: var(--if-text);
  text-align: right;
  white-space: nowrap;
}
.if-directory-count {
  font-size: 0.8125rem;
  color: var(--if-text);
  margin: 0 0 0.75rem;
}
.if-directory-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 520px;
  overflow-y: auto;
}
.if-directory-item {
  padding: 1rem;
  border: 1px solid var(--if-border);
  border-radius: 6px;
  background: var(--if-surface);
}
.if-directory-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.if-directory-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--if-charcoal);
}
.if-directory-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}
.if-directory-badge--safe {
  background: #e8f5e9;
  color: #2e7d32;
}
.if-directory-badge--breaks {
  background: #ffebee;
  color: #c62828;
}
.if-directory-badge--depends {
  background: #fff8e1;
  color: #f57f17;
}
.if-directory-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--if-text);
}
.if-directory-empty {
  font-size: 0.875rem;
  color: var(--if-text);
  margin: 0;
}
.if-affiliate-slot,
.if-directory-expand {
  border: 1px dashed var(--if-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  background: var(--if-surface);
}
.if-slot-placeholder {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--if-text);
  font-style: italic;
}
.if-lead-placeholder {
  border: 1px dashed var(--if-violet);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: #faf8ff;
}
.if-lead-placeholder p {
  margin: 0 0 0.5rem;
}
.if-lead-placeholder p:last-child {
  margin-bottom: 0;
}

/* Header logo — compact brand mark */
.site-logo img,
.ct-logo img,
.custom-logo-link img,
[class*="site-brand"] img {
  max-height: 38px;
  width: auto;
  height: auto;
}
.ct-header .site-title {
  font-size: 1.125rem;
  font-weight: 600;
}
