/*
Theme Name: MérésBiztos FSE
Theme URI: https://meresbiztos.hu
Author: MérésBiztos
Description: Szerkeszthető Full Site Editing block theme a MérésBiztos villamos biztonsági, villámvédelmi és napelempark-felülvizsgálati weboldalához.
Version: 0.3.0
Text Domain: meresbiztos-fse
Requires at least: 6.4
Requires PHP: 7.4
*/

:root {
  --mb-orange: #ff6a00;
  --mb-orange-dark: #d95500;
  --mb-black: #0c0d0e;
  --mb-dark: #151719;
  --mb-text: #17191b;
  --mb-muted: #686d72;
  --mb-border: #e6e7e9;
  --mb-surface: #f7f7f8;
  --mb-white: #ffffff;
  --mb-radius: 12px;
  --mb-shadow: 0 12px 34px rgba(0,0,0,.08);
  --mb-width: 1680px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .16em; }

/* FSE header */
.mb-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,13,14,.97);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}
body.admin-bar .mb-site-header { top: 32px; }
.mb-header-inner {
  min-height: 72px;
  width: min(calc(100% - 48px), var(--mb-width));
  margin-inline: auto;
}
.mb-brand-row { flex-shrink: 0; }
.mb-brand-copy { line-height: 1.05; }
.mb-site-header .wp-block-site-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.mb-site-header .wp-block-site-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.025em;
}
.mb-site-header .wp-block-site-title a { color: #fff; text-decoration: none; }
.mb-site-header .wp-block-site-tagline {
  margin: 4px 0 0;
  color: #bfc2c5;
  font-size: 11px;
  white-space: nowrap;
}
.mb-site-header .wp-block-navigation { margin-left: auto; }
.mb-site-header .wp-block-navigation-item__content {
  color: #e9eaeb;
  font-size: 13px;
  text-decoration: none;
}
.mb-site-header .wp-block-navigation-item__content:hover,
.mb-site-header .current-menu-item > .wp-block-navigation-item__content { color: var(--mb-orange); }
.mb-header-phone {
  font-weight: 750;
  white-space: nowrap;
  font-size: 14px;
}
.mb-header-phone a { color: #fff; text-decoration: none; }
.mb-header-phone a:hover { color: var(--mb-orange); }

/* Page content base */
.entry-content,
.wp-site-blocks { overflow-x: clip; }
.entry-content > * { max-width: var(--mb-width); margin-left: auto; margin-right: auto; }
.entry-content .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: var(--mb-width); }
.entry-content > .alignfull { max-width: none; }
.entry-content > .alignwide { max-width: 1760px; }
.entry-content h1, .entry-content h2, .entry-content h3 { line-height: 1.15; letter-spacing: -.025em; }
.entry-content h1 { font-size: clamp(36px, 4.2vw, 56px); }
.entry-content h2 { font-size: clamp(28px, 3vw, 38px); }
.entry-content h3 { font-size: clamp(20px, 2vw, 24px); }
.entry-content p { font-size: 16px; }

/* Existing MérésBiztos page blocks */
.mb-section { padding: 56px 32px; }
.mb-section--tight { padding-block: 42px; }
.mb-section--dark { background: linear-gradient(135deg, #0b0c0d 0%, #16181a 100%); color: #fff; }
.mb-section--soft { background: var(--mb-surface); }
.mb-eyebrow { color: var(--mb-orange); text-transform: uppercase; font-weight: 800; font-size: 13px; letter-spacing: .08em; margin-bottom: 12px; }
.mb-lead { font-size: clamp(17px,1.6vw,20px) !important; color: #d7d9db; max-width: 920px !important; }
.mb-text-muted { color: var(--mb-muted); }
.mb-section--dark .mb-text-muted { color: #b9bdc0; }

.mb-hero {
  position: relative;
  padding: 62px 32px 52px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 22%, rgba(255,106,0,.19), transparent 22%),
    linear-gradient(125deg, #070809 0%, #111315 58%, #1b1d1f 100%);
}
.mb-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to left, black, transparent 75%);
}
.mb-hero > * { position: relative; z-index: 1; }
.mb-hero h1 { margin-top: 0; margin-bottom: 18px; max-width: 1080px !important; }
.mb-hero h1 strong { color: var(--mb-orange); }
.mb-hero .wp-block-buttons { margin-top: 24px; gap: 12px; }
.wp-block-button__link { font-weight: 750; text-decoration: none; }
.mb-btn-primary .wp-block-button__link { background: var(--mb-orange) !important; color: #fff !important; }
.mb-btn-primary .wp-block-button__link:hover { background: var(--mb-orange-dark) !important; }
.mb-btn-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border: 1px solid var(--mb-orange); }

.mb-trust-row { margin-top: 30px; display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mb-trust-item { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); }
.mb-trust-item strong { display: block; color: #fff; font-size: 15px; margin-bottom: 4px; }
.mb-trust-item p { color: #bfc2c5; font-size: 13px; margin: 0; }
.mb-trust-icon { color: var(--mb-orange); font-size: 24px; line-height: 1; margin-bottom: 8px; }

.mb-card-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.mb-card { background: #fff; border: 1px solid var(--mb-border); border-radius: var(--mb-radius); padding: 22px; box-shadow: 0 4px 18px rgba(0,0,0,.04); height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.mb-card:hover { transform: translateY(-3px); box-shadow: var(--mb-shadow); }
.mb-card h3 { margin-top: 12px; font-size: 22px; }
.mb-card p { font-size: 15px; color: var(--mb-muted); }
.mb-card-icon { width: 48px; height: 48px; border: 1px solid rgba(255,106,0,.35); border-radius: 12px; display: grid; place-items: center; color: var(--mb-orange); font-size: 24px; }
.mb-card-link { color: var(--mb-orange); font-weight: 800; text-decoration: none; }

.mb-feature-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 28px; }
.mb-feature { padding: 16px 28px; border-right: 1px solid rgba(255,255,255,.18); text-align: center; }
.mb-feature:last-child { border-right: 0; }
.mb-feature .mb-card-icon { margin-inline: auto; border: 0; }
.mb-feature p { font-size: 14px; color: #b8bbbe; }

.mb-cta { display: flex !important; align-items: center; justify-content: space-between; gap: 30px; }
.mb-cta h2 { margin: 0 0 8px; }
.mb-cta p { margin: 0; color: var(--mb-muted); }
.mb-cta .wp-block-buttons { flex-shrink: 0; }

.mb-page-hero { padding: 56px 32px 44px; background: #0d0f10; color: #fff; }
.mb-page-hero h1 { margin: 0 0 14px; max-width: 1100px !important; }
.mb-page-hero p { max-width: 760px !important; color: #c8cbcd; font-size: 19px; }
.mb-prose { padding: 54px 32px; }
.mb-prose > * { max-width: 820px !important; }
.mb-list-check { padding-left: 0; list-style: none; }
.mb-list-check li { margin: 10px 0; }
.mb-list-check li::before { content: "✓"; color: var(--mb-orange); font-weight: 900; margin-right: 10px; }
.mb-notice { background: #fff6ee; border-left: 4px solid var(--mb-orange); padding: 18px 20px; border-radius: 8px; }

/* FSE footer */
.mb-site-footer { background: #0b0c0d; color: #d8dadd; border-top: 1px solid #212326; }
.mb-footer-inner { width: min(calc(100% - 48px), var(--mb-width)); margin-inline: auto; padding: 46px 0 22px; }
.mb-site-footer .wp-block-site-logo img { width: 44px; height: 44px; object-fit: contain; }
.mb-site-footer .wp-block-site-title { margin: 0; font-size: 22px; font-weight: 800; }
.mb-site-footer .wp-block-site-title a { color: #fff; text-decoration: none; }
.mb-site-footer .wp-block-site-tagline { color: #b9bdc0; font-size: 13px; }
.mb-footer-title { color: #fff; font-weight: 800; margin-bottom: 10px; }
.mb-site-footer p, .mb-site-footer a { color: #b9bdc0; font-size: 14px; }
.mb-site-footer a:hover { color: var(--mb-orange); }
.mb-footer-bottom { border-top: 1px solid #232629; padding-top: 16px; margin-top: 26px; color: #858a8e; font-size: 12px; }

/* Editor friendliness */
.block-editor-block-list__layout .mb-card,
.block-editor-block-list__layout .mb-feature,
.block-editor-block-list__layout .mb-trust-item { min-height: 80px; }

@media (max-width: 1180px) {
  .mb-header-phone { display: none; }
  .mb-site-header .wp-block-navigation-item__content { font-size: 12px; }
  .mb-card-grid { grid-template-columns: repeat(2,1fr); }
  .mb-trust-row, .mb-feature-grid { grid-template-columns: repeat(2,1fr); }
  .mb-feature:nth-child(2) { border-right: 0; }
}
@media (max-width: 782px) {
  body.admin-bar .mb-site-header { top: 46px; }
  .mb-header-inner { width: min(calc(100% - 28px), var(--mb-width)); min-height: 66px; }
  .mb-site-header .wp-block-site-tagline { display: none; }
  .mb-site-header .wp-block-site-title { font-size: 21px; }
  .mb-site-header .wp-block-site-logo img { width: 40px; height: 40px; }
  .mb-hero { padding: 48px 14px 42px; }
  .mb-section { padding: 44px 14px; }
  .mb-page-hero { padding: 46px 14px 38px; }
  .mb-prose { padding: 44px 14px; }
  .mb-card-grid, .mb-trust-row, .mb-feature-grid { grid-template-columns: 1fr; }
  .mb-feature { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .mb-feature:last-child { border-bottom: 0; }
  .mb-cta { flex-direction: column; align-items: flex-start; }
  .mb-footer-inner { width: min(calc(100% - 28px), var(--mb-width)); }
}
