/* kartaanergias.com — custom stylesheet. Mediterranean theme. Zero external imports. */
:root {
  --bg: #fdfbf6;
  --bg-soft: #f7f2e7;
  --card: #ffffff;
  --ink: #2e2a23;
  --muted: #6f675c;
  --olive: #5f7434;
  --olive-dark: #475a26;
  --terracotta: #c65d21;
  --terracotta-dark: #a34d1a;
  --gold: #d9a441;
  --line: #e7ddc9;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(46, 42, 35, 0.07);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
img { max-width: 100%; height: auto; }
a { color: var(--olive-dark); }
a:hover { color: var(--terracotta); }

/* Header */
.site-header { background: var(--card); border-bottom: 3px solid var(--olive); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1.25rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-name { font-size: 1.45rem; font-weight: 800; letter-spacing: 0.5px; color: var(--olive-dark); }
.main-nav ul { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; font-weight: 600; color: var(--ink); padding: 0.4rem 0.2rem; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.6rem; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }
.mobile-menu { background: var(--card); border-bottom: 2px solid var(--line); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0.5rem 1.25rem 1rem; }
.mobile-menu a { display: block; padding: 0.6rem 0; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); }

/* Hero */
.hero { background: linear-gradient(135deg, #f3ecda 0%, #fdfbf6 60%), radial-gradient(circle at 85% 20%, rgba(217,164,65,0.25), transparent 55%); padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 2.1rem; line-height: 1.3; margin: 0 0 0.8rem; color: var(--olive-dark); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

/* Ad slots */
.ad-slot { border: 1px dashed #c9bfa8; background: #faf7ef; border-radius: var(--radius); text-align: center; padding: 1.4rem 1rem; margin: 1.8rem 0; color: #a89e86; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; }
.ad-slot span { display: inline-block; }

/* Cards & grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.card h2, .card h3 { margin-top: 0; }
.card-hover { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(46,42,35,0.12); }
.tool-card h3 { margin: 0 0 0.5rem; }
.tool-card h3 a { text-decoration: none; color: var(--olive-dark); }
.tool-card p { color: var(--muted); font-size: 0.98rem; }
.btn { display: inline-block; background: var(--terracotta); color: #fff !important; font-weight: 700; padding: 0.7rem 1.6rem; border-radius: 10px; text-decoration: none; border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--terracotta-dark); }
.btn-outline { display: inline-block; border: 2px solid var(--olive); color: var(--olive-dark) !important; font-weight: 700; padding: 0.55rem 1.3rem; border-radius: 10px; text-decoration: none; }
.btn-outline:hover { background: var(--olive); color: #fff !important; }

/* Forms */
.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
input[type="text"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: var(--font); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--olive); border-color: var(--olive); }
.field-error { color: #b3261e; font-size: 0.9rem; margin-top: 0.25rem; }
.form-success { background: #eef4e4; border: 1px solid var(--olive); color: var(--olive-dark); padding: 1rem 1.2rem; border-radius: 10px; font-weight: 600; }
.ing-row { display: grid; grid-template-columns: 1fr 120px 40px; gap: 0.6rem; align-items: end; margin-bottom: 0.7rem; }
.remove-row { background: #f3e2d8; border: none; border-radius: 8px; font-size: 1.1rem; cursor: pointer; padding: 0.55rem 0; color: var(--terracotta-dark); }

/* Results */
.result-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.result-card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--olive); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.result-card.highlight { border-left-color: var(--terracotta); background: #fff8f1; }
.result-card h3 { font-size: 0.95rem; margin: 0 0 0.4rem; color: var(--muted); font-weight: 600; }
.result-card .amount { font-size: 1.5rem; font-weight: 800; color: var(--olive-dark); }
.result-card.highlight .amount { color: var(--terracotta-dark); }
.result-warn { border-left-color: #b3261e; }
.calc-disclaimer { background: #fff8f1; border: 1px solid #ecd9c2; border-radius: 10px; padding: 0.9rem 1.1rem; font-size: 0.93rem; color: var(--muted); margin-top: 1rem; }
.meta-line { font-size: 0.9rem; color: var(--muted); }

/* Macro bars */
.macro-bar { margin: 0.7rem 0; }
.macro-bar .bar-label { display: flex; justify-content: space-between; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.macro-track { background: #eee7d3; border-radius: 999px; height: 16px; overflow: hidden; }
.macro-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.fill-protein { background: var(--terracotta); }
.fill-carbs { background: var(--gold); }
.fill-fat { background: var(--olive); }

/* Tables */
table.spec { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.98rem; background: var(--card); }
table.spec caption { font-weight: 700; text-align: left; padding: 0.5rem 0; }
table.spec th, table.spec td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
table.spec th { background: var(--bg-soft); color: var(--olive-dark); }
table.spec tr:nth-child(even) td { background: #fbf8f0; }

/* FAQ */
details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 0.7rem; padding: 0.2rem 1rem; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 0.8rem 0; color: var(--olive-dark); }
details.faq .faq-body { padding-bottom: 1rem; color: var(--ink); }

/* TOC */
nav.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.4rem; margin: 1.4rem 0; }
nav.toc h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
nav.toc ul { margin: 0; padding-left: 1.2rem; }

/* Article meta */
.article-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.92rem; margin: 0.6rem 0 1.2rem; }
.author-box { display: flex; gap: 1rem; align-items: center; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 2rem 0; }
.author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--olive); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; flex-shrink: 0; }

/* Disclaimer notice */
.notice { background: #fdf3e7; border-left: 5px solid var(--gold); padding: 1rem 1.2rem; border-radius: 0 10px 10px 0; margin: 1.4rem 0; font-size: 0.97rem; }

/* Breadcrumb */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin: 1.2rem 0 0; }
.breadcrumb a { color: var(--muted); }

/* CTA */
.cta-box { background: var(--olive-dark); color: #fff; border-radius: var(--radius); padding: 2rem; text-align: center; margin: 2rem 0; }
.cta-box h2 { color: #fff; margin-top: 0; }
.cta-box p { color: #e9e2d2; }
.cta-box .btn { margin-top: 0.6rem; }

/* Filter buttons */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.filter-btn { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.45rem 1.1rem; cursor: pointer; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.filter-btn.active { background: var(--olive); border-color: var(--olive); color: #fff; }

/* Footer */
.site-footer { background: #2e2a23; color: #d8d0bd; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding: 2.5rem 1.25rem 1rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-top: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: #d8d0bd; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; gap: 0.8rem; align-items: flex-start; }
.footer-disclaimer { border-top: 1px solid #4a4438; padding: 1.2rem 1.25rem; font-size: 0.92rem; color: #b7ad94; }
.footer-bottom { border-top: 1px solid #4a4438; padding: 1rem 0; font-size: 0.88rem; color: #a89e86; }

/* Sections */
.section { padding: 2.2rem 0; }
.section h2 { color: var(--olive-dark); }
.prose h2 { color: var(--olive-dark); margin-top: 2rem; }
.prose h3 { color: var(--terracotta-dark); }

@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .menu-toggle { display: block; }
  .hero h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .ing-row { grid-template-columns: 1fr 100px 36px; }
}
