/*
Theme Name: Mindmarqs
Theme URI: https://mindmarqs.com
Description: Block theme for Mindmarqs. Pages, header, footer and menu are native blocks editable in the Site Editor; content is synchronised from the React project.
Author: Mindmarqs Team
Author URI: https://mindmarqs.com
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mindmarqs
Tags: custom-background, custom-colors, custom-header, custom-menu, featured-images, full-width-template, theme-options, translation-ready
Requires at least: 6.6
Tested up to: 6.4
Requires PHP: 7.4

This theme is licensed under the GPL.
*/

:root {
  --background: 0 0% 100%;
  --foreground: 180 10% 15%;
  --card: 0 0% 100%;
  --card-foreground: 180 10% 15%;
  --popover: 0 0% 100%;
  --popover-foreground: 180 10% 15%;
  --primary: 174 55% 24%;
  --primary-foreground: 0 0% 100%;
  --secondary: 160 100% 37%;
  --secondary-foreground: 0 0% 100%;
  --muted: 170 15% 95%;
  --muted-foreground: 180 8% 45%;
  --accent: 160 100% 37%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 170 10% 90%;
  --input: 170 10% 90%;
  --ring: 174 55% 24%;
  --radius: 0.75rem;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter 18pt', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
}

/* ------------------------------------------------------------------
 * Scroll reveal (fade up, 700ms, once) - class added by scroll-animations.js
 * ----------------------------------------------------------------- */
.mm-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.mm-reveal.mm-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mm-reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------
 * Logged-in admin bar: push the fixed navbar (and mobile overlay) below it
 * ----------------------------------------------------------------- */
body.admin-bar #mindmarqs-nav { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar #mindmarqs-nav { top: 46px; } }
#mindmarqs-nav.scrolled { background-color: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mm-footer-links a, .mm-footer-bottom a { transition: color .3s; }
.mm-footer-links a:hover, .mm-footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------------
 * Blocks added by the client OUTSIDE a Mindmarqs section (a paragraph,
 * an image...): same container as the sections.
 * ----------------------------------------------------------------- */
.wp-block-post-content > :not(section) {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 1024px) {
  .wp-block-post-content > :not(section) { padding-left: 5rem; padding-right: 5rem; }
}
.wp-block-post-content > :first-child:not(section) { padding-top: 7rem; }
.wp-block-post-content > p, .wp-block-post-content > ul, .wp-block-post-content > ol { font-size: 15px; line-height: 1.7; margin-top: 1rem; margin-bottom: 1rem; }

/* ------------------------------------------------------------------
 * Native blocks used by the sections (group, heading, buttons, table...)
 * ----------------------------------------------------------------- */
:where(.wp-block-group, .wp-block-image, .wp-block-video, .wp-block-buttons, .wp-block-table, .wp-block-quote, .wp-block-details) { margin-top: 0; margin-bottom: 0; }
.wp-block-image img, .wp-block-video video { display: block; max-width: 100%; }
.mm-cover-img { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; }
.mm-cover-img img, .mm-cover-img video { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.wp-block-group > .wp-block-image.w-full { width: 100%; }
.wp-block-image.w-full img { width: 100%; }
.wp-block-image.object-cover img { object-fit: cover; height: inherit; }
.mm-home-title strong { display: block; font-weight: 400; color: #fff; }
.mm-strong strong { font-weight: 600; }
.mm-labelled strong { font-weight: 600; color: hsl(var(--foreground)); }
.mm-prose-list, .wp-block-list.list-none { list-style: none; padding-left: 0; margin: 0; }
.wp-block-list.list-none > li + li { margin-top: 1rem; }
.wp-block-quote { border: 0; }
.wp-block-quote.border-l-4 { border-left: 4px solid #0B4F48; }
.wp-block-quote p { margin: 0; }
.wp-block-quote cite { display: block; margin-top: .75rem; font-size: 13px; font-style: normal; opacity: .7; }
p > a { text-decoration: none; }
p > a:hover { opacity: .8; }

/* Buttons (core "Button" block) */
.mm-btn .wp-block-button__link {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: 9999px; padding: .75rem 1.75rem; font-size: 13px; font-weight: 500; line-height: 1.5;
  text-decoration: none; border: 1px solid transparent; transition: all .3s;
}
.mm-btn .wp-block-button__link::after {
  content: ""; width: .875rem; height: .875rem; background-color: currentColor; transition: transform .3s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 5l7 7m0 0l-7 7m7-7H3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 5l7 7m0 0l-7 7m7-7H3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mm-btn .wp-block-button__link:hover::after { transform: translateX(4px); }
.mm-btn-white .wp-block-button__link { background: #fff; color: #0B4F48; }
.mm-btn-white .wp-block-button__link:hover { background: rgba(255,255,255,.9); }
.mm-btn-outline .wp-block-button__link { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.mm-btn-outline .wp-block-button__link:hover { background: rgba(255,255,255,.2); }
.mm-btn-green .wp-block-button__link { background: #0B4F48; color: #fff; }
.mm-btn-green .wp-block-button__link:hover { background: #0C4F48; opacity: .9; }

/* Tables (shift / products) */
.wp-block-table.mm-table { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: 1rem; }
.wp-block-table.mm-table thead { border-bottom: 0; }
.mm-table table { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; margin: 0; table-layout: auto; }
.mm-table th, .mm-table td { padding: 1rem 1.5rem; border: 0; border-left: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); font-size: 14px; line-height: 1.5; color: hsl(var(--foreground) / .7); vertical-align: top; }
.mm-products td:nth-child(n+2) { line-height: 1.625; }
.mm-shift td { vertical-align: middle; }
.mm-table th:first-child, .mm-table td:first-child { border-left: 0; }
.mm-table tbody tr:last-child td { border-bottom: 0; }
.mm-table thead th { background: #F9FAF9; font-size: 15px; font-weight: 600; color: hsl(var(--muted-foreground)); }
.mm-shift tbody td:first-child { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #0B4F48; }
.mm-shift thead th:last-child { background: #0B4F48; color: #fff; }
.mm-shift tbody td:last-child { background: rgba(11,79,72,.06); font-weight: 600; color: hsl(var(--foreground)); }
.mm-products tbody td { padding: 1.25rem 1.5rem; }
.mm-products tbody td:first-child { color: hsl(var(--foreground)); font-size: 15px; font-weight: 500; }
.mm-products tbody tr:nth-child(2) td:first-child strong { background: #1A7A6E; }
.mm-products tbody td:first-child strong { display: inline-block; font-size: 13px; font-weight: 600; padding: .5rem 1rem; border-radius: .375rem; color: #fff; background: #0B4F48; margin-bottom: .5rem; }

.mm-products { --c1: 32.4%; }
.mm-products thead th:nth-child(1) { width: 32.4%; }
.mm-products thead th:nth-child(2) { width: 40.6%; }
.mm-products thead th:nth-child(3) { width: 27%; }
@media (max-width: 767.98px) {
  .wp-block-table.mm-table { border: 0; border-radius: 0; overflow: visible; }
  .mm-table table, .mm-table tbody, .mm-table tr { display: block; min-width: 0; }
  .mm-table thead { display: none; }
  .mm-table tr { margin-bottom: 2rem; }
  .mm-table td { display: flex; justify-content: space-between; gap: .75rem; border: 0; padding: .375rem 0 .375rem 1rem; text-align: right; font-size: 13px; }
  .mm-table td::before { content: attr(data-label); flex: none; text-align: left; font-size: 12px; color: hsl(var(--muted-foreground)); }
  .mm-shift tbody { counter-reset: mmrow; }
  .mm-shift tbody tr { position: relative; counter-increment: mmrow; }
  .mm-shift tbody tr::before { content: ""; position: absolute; left: 0; top: 2.25rem; bottom: .5rem; width: 1px; background: linear-gradient(to bottom, rgba(11,79,72,.12), rgba(11,79,72,.9)); }
  .mm-shift tbody td:first-child { display: flex; align-items: center; gap: .625rem; padding: 0 0 .75rem; text-align: left; font-size: 11px; letter-spacing: .1em; }
  .mm-shift tbody td:first-child::before { content: counter(mmrow, decimal-leading-zero); font-size: 10px; letter-spacing: .05em; color: rgba(11,79,72,.4); }
  .mm-shift tbody td:first-child::after { content: ""; flex: 1; height: 1px; background: rgba(11,79,72,.1); }
  .mm-shift tbody td:last-child { background: #0B4F48; color: #F9FAF9; font-weight: 600; border-radius: .75rem; padding: .625rem .875rem; margin: .25rem 0 0 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  .mm-shift tbody td:last-child::before { color: rgba(249,250,249,.8); font-size: 11px; }
  .mm-shift tbody td:not(:first-child):not(:last-child) { padding-top: .5rem; padding-bottom: .5rem; }
  .mm-products tr { border: 1px solid hsl(var(--border)); border-radius: 1rem; padding: 1.5rem; background: #F9FAF9; margin-bottom: 1rem; box-shadow: 0 8px 30px -8px rgba(11,79,72,.12); }
  .mm-products td { display: block; text-align: left; padding: .5rem 0 !important; }
  .mm-products td::before { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .25rem; }
  .mm-products td:first-child::before { display: none; }
}

/* FAQ (core "Details" block) */
.mm-faq-item { border-bottom: 1px solid hsl(var(--foreground) / .1); }
.mm-faq-item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem 0; font-family: 'Inter', sans-serif; font-size: 17px; font-weight: 500; color: hsl(var(--foreground));
}
@media (min-width: 1024px) { .mm-faq-item > summary { font-size: 19px; } }
.mm-faq-item > summary::-webkit-details-marker { display: none; }
.mm-faq-item > summary::after {
  content: ""; width: 1rem; height: 1rem; flex-shrink: 0; background-color: currentColor; transition: transform .2s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='black' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mm-faq-item[open] > summary::after { transform: rotate(180deg); }

/* ------------------------------------------------------------------
 * White paper body (.mm-prose): plain HTML edited in the WP editor,
 * styled like the React article body (prose-content).
 * ----------------------------------------------------------------- */
.mm-prose { font-size: 16px; line-height: 1.75; color: hsl(var(--foreground) / 0.8); }
.mm-prose > * + * { margin-top: 1.25rem; }
.mm-prose h2 { font-size: 1.6rem; font-weight: 600; color: #0B4F48; scroll-margin-top: 6rem; }
.mm-prose h3 { font-size: 1.2rem; font-weight: 600; color: #0B4F48; scroll-margin-top: 6rem; }
.mm-prose ul { list-style: disc; padding-left: 1.5rem; }
.mm-prose ul > * + *, .mm-prose ol > * + * { margin-top: 0.5rem; }
.mm-prose ol { list-style: none; padding-left: 0; font-size: 14px; color: hsl(var(--foreground) / 0.7); }
.mm-prose .mm-small { font-size: 14px; }
.mm-prose p.mm-label { font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: #0B4F48; }
.mm-prose p.mm-lead { font-size: 17px; font-weight: 500; color: hsl(var(--foreground)); }
.mm-prose p.mm-quote { color: #0B4F48; font-size: 1.1rem; font-weight: 500; line-height: 1.625; }
.mm-prose a { color: #0B4F48; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.mm-prose a:hover { opacity: 0.8; }
.mm-prose strong { font-weight: 600; }
