/* ===== MEDKON — EXTRA STYLES (v2) =====
   Loaded after style.css on every page. Contains: contrast fixes, WhatsApp button,
   above-the-fold visibility, trust strip, service pages, blog and form states. */

/* ---- Contrast (WCAG AA on #080808) ---- */
:root {
  --gray-500: #8d8d8d;
  --gray-600: #7f7f7f;
}
.footer-link { color: var(--gray-400); }
.footer-link:hover { color: var(--white); }
.footer-copy, .footer-social { color: var(--gray-500); }
.footer-social:hover { color: var(--white); }
.contact-info-label { color: var(--gray-500); }

/* ---- Above-the-fold content must never wait for JavaScript ---- */
.hero .fade-up, .hero .fade-in, .hero .slide-left, .hero .slide-right, .hero .scale-up,
.page-hero .fade-up, .page-hero .fade-in, .page-hero .slide-left, .page-hero .slide-right, .page-hero .scale-up,
.svc-hero .fade-up, .svc-hero .fade-in, .blog-hero .fade-up, .blog-hero .fade-in {
  opacity: 1; transform: none;
}
.hero .word, .page-hero .word, .svc-hero .word { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .fade-up, .fade-in, .slide-left, .slide-right, .scale-up, .stagger > * { opacity: 1 !important; transform: none !important; }
  .word { transform: none !important; }
}

body.page-fixed-nav { padding-top: calc(var(--nav-height) + 38px + 40px); }

/* ---- Floating WhatsApp button ---- */
.wa-float {
  position: fixed; right: 24px; bottom: 88px; z-index: 889;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wa-float:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 26px rgba(37, 211, 102, 0.5); }
@media (max-width: 768px) { .wa-float { right: 14px; bottom: 76px; width: 48px; height: 48px; } }

/* ---- Buttons: WhatsApp variant ---- */
.btn-wa { background: #25d366; color: #062b12; padding: 16px 32px; }
.btn-wa:hover { background: #1fb858; }

/* ---- Trust strip ---- */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--gray-800); margin-top: 56px; }
.trust-item { padding: 22px 24px; border-right: 1px solid var(--gray-800); }
.trust-item:last-child { border-right: none; }
.trust-num { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.trust-lbl { font-size: 13px; color: var(--gray-400); margin-top: 8px; }
@media (max-width: 768px) {
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(2) { border-right: none; }
  .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--gray-800); }
}

/* ---- Problem list ---- */
.pain-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--gray-800); border: 1px solid var(--gray-800); margin-top: 48px; }
.pain-item { background: var(--black); padding: 36px 32px; }
.pain-item p { color: var(--gray-300); font-size: 17px; line-height: 1.6; }
.pain-item .label { display: block; margin-bottom: 14px; }
@media (max-width: 900px) { .pain-list { grid-template-columns: 1fr; } }

/* ---- Feature service cards (home) ---- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--gray-800); border: 1px solid var(--gray-800); margin-top: 48px; }
.feature-card { background: var(--black); padding: 52px 44px; display: flex; flex-direction: column; gap: 18px; transition: background var(--transition); }
.feature-card:hover { background: var(--gray-900); }
.feature-card .ideal { font-size: 14px; color: var(--gray-400); border-top: 1px solid var(--gray-800); padding-top: 18px; margin-top: auto; }
.feature-card .ideal strong { color: var(--white); font-weight: 600; }
.also-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--gray-800); border: 1px solid var(--gray-800); border-top: none; }
.also-item { background: var(--black); padding: 28px 28px 32px; display: block; transition: background var(--transition); }
.also-item:hover { background: var(--gray-900); }
.also-item h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.also-item p { font-size: 14px; color: var(--gray-400); line-height: 1.6; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } .also-grid { grid-template-columns: 1fr 1fr; } .feature-card { padding: 40px 28px; } }
@media (max-width: 520px) { .also-grid { grid-template-columns: 1fr; } }

/* ---- Service page ---- */
.svc-hero { padding: calc(var(--nav-height, 80px) + 38px + 56px) 0 90px; border-bottom: 1px solid var(--gray-800); }
.svc-hero .display-lg { max-width: 980px; margin-bottom: 28px; }
.svc-hero .lead { max-width: 720px; font-size: 19px; line-height: 1.75; color: var(--gray-300); margin-bottom: 36px; }
.svc-hero .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--gray-500); margin-bottom: 28px; }
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span[aria-hidden] { color: var(--gray-700); }
.deliver-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--gray-800); border: 1px solid var(--gray-800); margin-top: 40px; }
.deliver-item { background: var(--black); padding: 32px 32px 34px; }
.deliver-item h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.deliver-item p { color: var(--gray-400); font-size: 15px; line-height: 1.7; }
@media (max-width: 768px) { .deliver-grid { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }
.check-list { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.check-list li { position: relative; padding-left: 28px; color: var(--gray-300); font-size: 16px; line-height: 1.6; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--white); font-weight: 700; }
.proof-box { border: 1px solid var(--gray-800); padding: 32px; background: var(--gray-900); }
.proof-box h3 { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 14px; }
.proof-box p, .proof-box li { color: var(--gray-300); font-size: 16px; line-height: 1.7; }
.proof-box ul { display: flex; flex-direction: column; gap: 10px; }
.faq-simple { margin-top: 36px; border-top: 1px solid var(--gray-800); }
.faq-simple details { border-bottom: 1px solid var(--gray-800); padding: 22px 0; }
.faq-simple summary { cursor: pointer; font-family: var(--font-display); font-size: 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-simple summary::-webkit-details-marker { display: none; }
.faq-simple summary::after { content: "+"; color: var(--gray-400); font-size: 24px; line-height: 1; }
.faq-simple details[open] summary::after { content: "–"; }
.faq-simple details p { margin-top: 14px; color: var(--gray-400); line-height: 1.8; max-width: 760px; }
.cta-note { margin-top: 22px; font-size: 14px; color: var(--gray-400); }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.related-links a { border: 1px solid var(--gray-700); padding: 9px 16px; font-size: 14px; color: var(--gray-300); transition: all var(--transition-fast); }
.related-links a:hover { border-color: var(--white); color: var(--white); }

/* ---- Contact form states ---- */
.form-error { display: none; border: 1px solid #7a2a2a; background: rgba(122, 42, 42, 0.18); color: #f0b6b6; padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.form-error.show { display: block; }
.field-error { color: #f0b6b6; font-size: 13px; margin-top: 4px; min-height: 0; }
.form-input.invalid, .form-select.invalid, .form-textarea.invalid { border-color: #b24a4a; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-row label { cursor: pointer; }
.chip-row input { position: absolute; opacity: 0; pointer-events: none; }
.chip-row span { display: inline-block; padding: 10px 16px; border: 1px solid var(--gray-700); font-size: 14px; color: var(--gray-300); transition: all var(--transition-fast); }
.chip-row input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
.chip-row input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.chip-row label:hover span { border-color: var(--gray-300); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ---- Blog ---- */
.blog-hero { padding: 50px 0 70px; border-bottom: 1px solid var(--gray-800); }
.blog-hero h1 { max-width: 920px; margin-bottom: 22px; }
.blog-hero p.lead { max-width: 680px; font-size: 18px; color: var(--gray-300); line-height: 1.75; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.cat-chips a { border: 1px solid var(--gray-700); padding: 8px 16px; font-size: 13px; color: var(--gray-300); font-family: var(--font-display); font-weight: 500; transition: all var(--transition-fast); }
.cat-chips a:hover, .cat-chips a.active { background: var(--white); color: var(--black); border-color: var(--white); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--gray-800); border: 1px solid var(--gray-800); margin-top: 56px; }
.blog-card { background: var(--black); display: flex; flex-direction: column; transition: background var(--transition); }
.blog-card:hover { background: var(--gray-900); }
.blog-card-img { aspect-ratio: 16 / 9; background: var(--gray-900); overflow: hidden; border-bottom: 1px solid var(--gray-800); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-img.placeholder { display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 44px; letter-spacing: -0.04em; color: var(--gray-700); }
.blog-card-body { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.blog-card h2, .blog-card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.blog-card p { color: var(--gray-400); font-size: 15px; line-height: 1.65; }
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--gray-500); }
.blog-meta .cat { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; color: var(--gray-300); }
.blog-empty { border: 1px solid var(--gray-800); padding: 72px 40px; text-align: center; margin-top: 56px; color: var(--gray-400); }
.pagination { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { border: 1px solid var(--gray-700); padding: 10px 16px; font-size: 14px; color: var(--gray-300); }
.pagination a:hover { border-color: var(--white); color: var(--white); }
.pagination .current { background: var(--white); color: var(--black); border-color: var(--white); }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }

.post-header { padding: 40px 0 40px; }
.post-header h1 { font-family: var(--font-display); font-size: clamp(34px, 5.2vw, 64px); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; max-width: 980px; margin: 18px 0 22px; }
.post-header .excerpt { max-width: 760px; font-size: 19px; line-height: 1.7; color: var(--gray-300); }
.post-header .blog-meta { margin-top: 24px; font-size: 14px; }
.post-cover { margin: 0 0 56px; border: 1px solid var(--gray-800); max-height: 520px; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 80px; justify-content: space-between; align-items: start; padding-bottom: 40px; }
@media (max-width: 1080px) { .post-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.toc { position: sticky; top: 120px; border-left: 1px solid var(--gray-800); padding-left: 22px; }
.toc p { font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-500); margin-bottom: 16px; }
.toc ol { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.toc a { font-size: 14px; line-height: 1.45; color: var(--gray-400); }
.toc a:hover { color: var(--white); }
.toc li.l3 { padding-left: 14px; }
@media (max-width: 1080px) { .toc { position: static; border: 1px solid var(--gray-800); padding: 22px; order: -1; } }

.post-content { font-size: 18px; line-height: 1.85; color: var(--gray-300); }
.post-content > * + * { margin-top: 1.4em; }
.post-content h2 { font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--white); margin-top: 2.2em; scroll-margin-top: 110px; }
.post-content h3 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; color: var(--white); margin-top: 1.9em; scroll-margin-top: 110px; }
.post-content h4 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--white); margin-top: 1.6em; }
.post-content a { color: var(--white); text-decoration: underline; text-decoration-color: var(--gray-600); text-underline-offset: 3px; }
.post-content a:hover { text-decoration-color: var(--white); }
.post-content strong, .post-content b { color: var(--white); font-weight: 600; }
.post-content ul, .post-content ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 0.5em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li::marker { color: var(--gray-500); }
.post-content blockquote { border-left: 3px solid var(--white); padding: 4px 0 4px 24px; color: var(--white); font-size: 20px; line-height: 1.6; }
.post-content code { background: var(--gray-900); border: 1px solid var(--gray-800); padding: 2px 7px; font-size: 0.88em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.post-content pre { background: var(--gray-900); border: 1px solid var(--gray-800); padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.post-content pre code { background: none; border: none; padding: 0; }
.post-content img { border: 1px solid var(--gray-800); margin: 0 auto; height: auto; }
.post-content figure { margin: 2em 0; }
.post-content figcaption { font-size: 14px; color: var(--gray-500); margin-top: 10px; text-align: center; }
.post-content hr { border: none; border-top: 1px solid var(--gray-800); margin: 2.5em 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--gray-800); padding: 12px 16px; text-align: left; vertical-align: top; }
.post-content th { background: var(--gray-900); color: var(--white); font-family: var(--font-display); font-weight: 600; }

.post-faq { margin-top: 64px; }
.post-faq h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.post-cta { margin: 64px 0 0; border: 1px solid var(--gray-700); padding: 44px 40px; background: var(--gray-900); }
.post-cta h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; line-height: 1.15; }
.post-cta p { color: var(--gray-300); max-width: 560px; margin-bottom: 26px; line-height: 1.7; }
.post-cta .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.related { border-top: 1px solid var(--gray-800); padding: 80px 0 100px; }
.related h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.legal-note { font-size: 13px; color: var(--gray-500); margin-top: 18px; }

/* ---- Case studies ---- */
.post-header .hero-ctas, .case-body .hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.case-body { max-width: 800px; padding-bottom: 40px; }
.case-title a:hover { text-decoration: underline; text-decoration-color: var(--gray-600); text-underline-offset: 4px; }
.case-card .case-action { margin-top: 28px; }

/* Brands marquee */
.brands-band { border-top: 1px solid var(--gray-800); border-bottom: 1px solid var(--gray-800); overflow: hidden; }
.mq { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mq-track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: mq-scroll 38s linear infinite; }
.mq:hover .mq-track { animation-play-state: paused; }
.mq-item { display: flex; align-items: center; flex: none; }
.mq-name { font-family: var(--font-display, inherit); font-size: clamp(26px, 3.4vw, 44px); font-weight: 600; letter-spacing: -0.02em; color: var(--gray-500); white-space: nowrap; padding: 6px 0; transition: color var(--transition, .2s); }
.mq-item:hover .mq-name { color: var(--white); }
.mq-sep { color: var(--gray-700, #444); font-size: 18px; margin: 0 clamp(28px, 4vw, 56px); }
@keyframes mq-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .mq { -webkit-mask-image: none; mask-image: none; }
  .mq-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: 8px 0; padding: 0 20px; }
  .mq-item[aria-hidden="true"] { display: none; }
}
