/*
Theme Name: MaxSH Apple Test
Theme URI: https://maxsh.pro/
Author: MaxSH
Description: Лёгкая минималистичная тема для тестирования страниц WordPress и контроля производительности. Визуально вдохновлена лаконичной эстетикой Apple Store без копирования фирменных материалов Apple.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: maxsh-apple-test
*/

:root {
  --mat-bg: #f5f5f7;
  --mat-surface: rgba(255,255,255,.86);
  --mat-card: #fff;
  --mat-text: #1d1d1f;
  --mat-muted: #6e6e73;
  --mat-line: #d2d2d7;
  --mat-blue: #0071e3;
  --mat-blue-hover: #0077ed;
  --mat-red: #d70015;
  --mat-green: #248a3d;
  --mat-shadow: 0 8px 28px rgba(0,0,0,.055);
  --mat-radius: 22px;
  --mat-content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--mat-bg);
  color: var(--mat-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mat-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.mat-wrap { width: min(calc(100% - 40px), var(--mat-content)); margin-inline: auto; }
.mat-site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(250,250,252,.82);
  border-bottom: 1px solid rgba(0,0,0,.08);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.mat-header-inner { min-height: 58px; display: flex; align-items: center; gap: 28px; }
.mat-brand { display:flex; align-items:center; gap:10px; min-width:max-content; color:var(--mat-text); font-weight:650; letter-spacing:-.02em; }
.mat-brand:hover { text-decoration:none; }
.mat-brand-mark { width:28px; height:28px; border-radius:9px; display:grid; place-items:center; background:#111; color:#fff; font-size:12px; font-weight:800; }
.mat-nav { margin-left:auto; }
.mat-nav ul { list-style:none; display:flex; gap:24px; margin:0; padding:0; align-items:center; }
.mat-nav a { color:#333336; font-size:13px; }
.mat-nav a:hover { color:#000; text-decoration:none; }
.mat-menu-toggle { display:none; margin-left:auto; border:0; background:transparent; font:inherit; padding:8px; }

.mat-hero { padding: 72px 0 38px; text-align:center; }
.mat-eyebrow { color:var(--mat-red); font-size:14px; font-weight:700; letter-spacing:.01em; }
.mat-hero h1, .mat-page-title { margin:8px auto 14px; max-width:900px; font-size:clamp(40px,7vw,72px); line-height:.98; letter-spacing:-.055em; font-weight:750; }
.mat-hero p { max-width:720px; margin:0 auto; color:var(--mat-muted); font-size:clamp(18px,2vw,24px); line-height:1.32; letter-spacing:-.02em; }
.mat-hero-actions { display:flex; justify-content:center; gap:12px; margin-top:26px; flex-wrap:wrap; }
.mat-button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 20px; border-radius:999px; background:var(--mat-blue); color:#fff; font-weight:600; font-size:15px; }
.mat-button:hover { background:var(--mat-blue-hover); color:#fff; text-decoration:none; }
.mat-button.secondary { background:transparent; color:var(--mat-blue); border:1px solid var(--mat-blue); }
.mat-button.secondary:hover { background:var(--mat-blue); color:#fff; }

.mat-main { padding: 28px 0 72px; }
.mat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.mat-card { background:var(--mat-card); border-radius:var(--mat-radius); overflow:hidden; box-shadow:var(--mat-shadow); border:1px solid rgba(0,0,0,.035); }
.mat-card-media { aspect-ratio:16/10; overflow:hidden; background:#ececef; }
.mat-card-media img { width:100%; height:100%; object-fit:cover; transition:transform .35s ease; }
.mat-card:hover .mat-card-media img { transform:scale(1.02); }
.mat-card-body { padding:24px; }
.mat-card-meta, .mat-entry-meta { color:var(--mat-muted); font-size:13px; }
.mat-card h2 { margin:6px 0 10px; font-size:25px; line-height:1.08; letter-spacing:-.035em; }
.mat-card h2 a { color:var(--mat-text); }
.mat-card h2 a:hover { text-decoration:none; color:#000; }
.mat-card p { margin:0; color:#515154; }

.mat-content-shell { max-width:980px; margin:0 auto; }
.mat-entry-header { text-align:center; padding:54px 0 34px; }
.mat-entry-title { margin:8px auto 14px; font-size:clamp(38px,6vw,66px); line-height:1.02; letter-spacing:-.05em; }
.mat-entry-featured { margin:0 auto 32px; border-radius:var(--mat-radius); overflow:hidden; background:#e8e8ed; }
.mat-entry-content { background:#fff; padding:clamp(24px,5vw,64px); border-radius:var(--mat-radius); box-shadow:var(--mat-shadow); font-size:18px; }
.mat-entry-content > *:first-child { margin-top:0; }
.mat-entry-content > *:last-child { margin-bottom:0; }
.mat-entry-content h2 { font-size:clamp(28px,4vw,42px); letter-spacing:-.035em; line-height:1.08; margin-top:1.4em; }
.mat-entry-content h3 { font-size:clamp(23px,3vw,32px); letter-spacing:-.025em; line-height:1.12; margin-top:1.35em; }
.mat-entry-content p, .mat-entry-content ul, .mat-entry-content ol { color:#333336; }
.mat-entry-content blockquote { margin:30px 0; padding:2px 0 2px 22px; border-left:4px solid var(--mat-blue); color:#515154; font-size:21px; }
.mat-entry-content table { width:100%; border-collapse:collapse; display:block; overflow:auto; }
.mat-entry-content th, .mat-entry-content td { padding:12px 14px; border-bottom:1px solid var(--mat-line); text-align:left; }
.mat-entry-content input, .mat-entry-content select, .mat-entry-content textarea { max-width:100%; border:1px solid #c7c7cc; border-radius:12px; padding:11px 13px; font:inherit; background:#fff; }
.mat-entry-content button, .mat-entry-content input[type=submit] { border:0; border-radius:999px; padding:11px 18px; background:var(--mat-blue); color:#fff; font-weight:600; cursor:pointer; }

.mat-section-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin:34px 0 18px; }
.mat-section-head h2 { margin:0; font-size:34px; letter-spacing:-.04em; }
.mat-section-head p { margin:0; color:var(--mat-muted); }

.mat-empty { background:#fff; border-radius:var(--mat-radius); padding:48px; text-align:center; box-shadow:var(--mat-shadow); }
.navigation.pagination { margin-top:30px; }
.nav-links { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.page-numbers { display:grid; min-width:40px; height:40px; place-items:center; padding:0 12px; border-radius:999px; background:#fff; color:var(--mat-text); }
.page-numbers.current { background:#111; color:#fff; }

.mat-footer { padding:26px 0 88px; color:var(--mat-muted); font-size:13px; }
.mat-footer-inner { border-top:1px solid var(--mat-line); padding-top:20px; display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; }

/* Performance HUD */
.mat-perf { position:fixed; right:16px; bottom:16px; z-index:99999; width:min(360px,calc(100vw - 32px)); font-size:12px; color:#f5f5f7; }
.mat-perf-toggle { width:100%; display:flex; justify-content:space-between; align-items:center; gap:12px; border:0; background:rgba(24,24,27,.92); color:#fff; border-radius:14px; padding:10px 13px; box-shadow:0 8px 30px rgba(0,0,0,.22); cursor:pointer; backdrop-filter:blur(18px); }
.mat-perf-toggle strong { font-size:12px; }
.mat-perf-dot { width:8px; height:8px; border-radius:50%; background:#30d158; display:inline-block; margin-right:7px; }
.mat-perf-panel { display:none; margin-top:6px; border-radius:14px; overflow:hidden; background:rgba(24,24,27,.95); box-shadow:0 8px 30px rgba(0,0,0,.22); backdrop-filter:blur(18px); }
.mat-perf.is-open .mat-perf-panel { display:block; }
.mat-perf-row { display:flex; justify-content:space-between; gap:14px; padding:9px 13px; border-top:1px solid rgba(255,255,255,.08); }
.mat-perf-row:first-child { border-top:0; }
.mat-perf-row span:first-child { color:#a1a1a6; }
.mat-perf-note { padding:9px 13px; color:#a1a1a6; border-top:1px solid rgba(255,255,255,.08); line-height:1.35; }

@media (max-width: 860px) {
  .mat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mat-menu-toggle { display:block; }
  .mat-nav { display:none; position:absolute; left:0; right:0; top:58px; background:rgba(250,250,252,.98); border-bottom:1px solid rgba(0,0,0,.08); }
  .mat-nav.is-open { display:block; }
  .mat-nav ul { flex-direction:column; align-items:stretch; gap:0; padding:12px 20px 18px; }
  .mat-nav a { display:block; padding:10px 0; font-size:15px; }
}
@media (max-width: 600px) {
  .mat-wrap { width:min(calc(100% - 24px),var(--mat-content)); }
  .mat-hero { padding-top:48px; }
  .mat-grid { grid-template-columns:1fr; }
  .mat-entry-header { padding-top:40px; }
  .mat-entry-content { font-size:17px; border-radius:18px; }
  .mat-card { border-radius:18px; }
}
