/*
Theme Name: Mamadysh Web Studio
Theme URI: https://mamadysh.ru
Author: Mamadysh Web Studio
Author URI: https://mamadysh.ru
Description: Профессиональная тема для студии веб-разработки — хостинг, разработка, автоматизация, техподдержка.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: mamadysh
*/

/* =============================================
   CSS RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0f1e;
  --bg-card:   #111827;
  --bg-muted:  #1a2235;
  --blue:      #2563eb;
  --blue-light:#3b82f6;
  --blue-glow: rgba(37,99,235,.18);
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --border:    rgba(255,255,255,.08);
  --radius:    12px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --max-w:     1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-light); text-decoration: none; }
a:hover { color: var(--text); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1,h2,h3,h4,h5,h6 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: 1.4rem; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-light);
  background: var(--blue-glow);
  border: 1px solid rgba(59,130,246,.25);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.accent { color: var(--blue-light); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 24px rgba(37,99,235,.35);
}
.btn-primary:hover { background: var(--blue-light); color: #fff; transform: translateY(-1px); box-shadow: 0 0 32px rgba(37,99,235,.5); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--blue-light); color: var(--text); }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(10,15,30,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.logo-icon {
  width: 34px; height: 34px;
  background: var(--blue);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
.main-nav a:hover { color: var(--text); }

.nav-cta { display: flex; gap: 12px; align-items: center; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.mobile-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  color: var(--text); font-size: 2rem;
  cursor: pointer;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(37,99,235,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-glow);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 999px;
  padding: 6px 16px 6px 8px;
  font-size: .82rem;
  color: var(--blue-light);
  margin-bottom: 32px;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.4; } }

.hero h1 { margin-bottom: 24px; }
.hero h1 .line { display: block; }
.hero h1 .line.blue { color: var(--blue-light); }

.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 40px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* =============================================
   SECTIONS COMMON
   ============================================= */
section { padding: 96px 0; }

.section-head {
  text-align: center;
  margin-bottom: 64px;
}
.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 16px auto 0;
}

/* =============================================
   SERVICES
   ============================================= */
.services { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.service-card:hover {
  border-color: rgba(59,130,246,.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(37,99,235,.12);
}

.service-icon {
  width: 52px; height: 52px;
  background: var(--blue-glow);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.service-card h3 { margin-bottom: 10px; font-size: 1.1rem; }
.service-card p { color: var(--muted); font-size: .9rem; line-height: 1.7; }

/* =============================================
   PROCESS
   ============================================= */
.process { background: var(--bg-muted); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  position: relative;
}

.step {
  text-align: center;
  padding: 32px 24px;
}

.step-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue-glow);
  border: 2px solid var(--blue);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue-light);
  margin: 0 auto 20px;
}

.step h3 { margin-bottom: 8px; font-size: 1rem; }
.step p { color: var(--muted); font-size: .875rem; }

/* =============================================
   PRICING
   ============================================= */
.pricing { background: var(--bg); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
  transition: border-color .25s, box-shadow .25s;
}
.pricing-card:hover { border-color: rgba(59,130,246,.3); box-shadow: 0 8px 32px rgba(37,99,235,.1); }
.pricing-card.featured {
  border-color: var(--blue);
  box-shadow: 0 0 40px rgba(37,99,235,.2);
}

.featured-badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-name { font-size: .82rem; font-weight: 600; color: var(--blue-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; }
.pricing-price { font-size: 2.6rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 4px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--muted); }
.pricing-desc { color: var(--muted); font-size: .875rem; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }

.pricing-features { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.feature-item { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.feature-item .check { color: #22c55e; font-size: .9rem; flex-shrink: 0; }

/* =============================================
   BLOG / NEWS
   ============================================= */
.news { background: var(--bg-muted); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.news-card:hover { border-color: rgba(59,130,246,.35); transform: translateY(-3px); }

.news-thumb { height: 200px; background: var(--bg-muted); overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb-placeholder { height: 100%; display: grid; place-items: center; font-size: 2.5rem; background: linear-gradient(135deg, var(--bg-muted), var(--bg-card)); }

.news-body { padding: 24px; }
.news-date { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.news-body h3 { font-size: 1rem; line-height: 1.4; margin-bottom: 10px; }
.news-body h3 a { color: var(--text); transition: color .2s; }
.news-body h3 a:hover { color: var(--blue-light); }
.news-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.6; }

/* =============================================
   CONTACT
   ============================================= */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 { margin-bottom: 16px; }
.contact-info p { color: var(--muted); margin-bottom: 32px; }

.contact-details { display: flex; flex-direction: column; gap: 16px; }
.contact-item { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.contact-item-icon { width: 38px; height: 38px; background: var(--blue-glow); border-radius: 8px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .82rem; font-weight: 500; color: var(--muted); }
.form-group input,
.form-group textarea,
.form-group select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--blue); }
.form-group textarea { min-height: 120px; resize: vertical; }

.form-success {
  display: none;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: #86efac;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p { color: var(--muted); font-size: .875rem; margin-top: 12px; max-width: 260px; line-height: 1.7; }

.footer-col h4 { font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: .875rem; color: var(--muted); transition: color .2s; }
.footer-col ul li a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .8rem; color: var(--muted); }

/* =============================================
   SINGLE POST
   ============================================= */
.post-hero { padding: 140px 0 64px; border-bottom: 1px solid var(--border); }
.post-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.post-category { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--blue-light); background: var(--blue-glow); padding: 4px 12px; border-radius: 999px; }
.post-date { font-size: .82rem; color: var(--muted); }

.post-content-wrap { max-width: 740px; margin: 0 auto; padding: 64px 24px; }
.post-content { color: var(--muted); line-height: 1.8; }
.post-content h2,.post-content h3 { color: var(--text); margin: 2em 0 .75em; }
.post-content p { margin-bottom: 1.5em; }
.post-content a { color: var(--blue-light); text-decoration: underline; }
.post-content ul,.post-content ol { margin: 1em 0 1.5em 1.5em; }
.post-content li { margin-bottom: .5em; }
.post-content blockquote { border-left: 3px solid var(--blue); padding: 16px 24px; background: var(--bg-card); border-radius: 0 8px 8px 0; margin: 1.5em 0; font-style: italic; }
.post-content img { border-radius: var(--radius); margin: 2em 0; }
.post-content code { background: var(--bg-card); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: .9em; }
.post-content pre { background: var(--bg-card); padding: 20px; border-radius: 8px; overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--border); }

/* =============================================
   ARCHIVE / BLOG PAGE
   ============================================= */
.archive-header { padding: 140px 0 64px; border-bottom: 1px solid var(--border); }
.posts-wrap { padding: 64px 0; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a,.pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: .875rem;
  color: var(--muted);
  transition: .2s;
}
.pagination a:hover,.pagination .current {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* =============================================
   PAGE CONTENT
   ============================================= */
.page-header { padding: 140px 0 56px; border-bottom: 1px solid var(--border); }
.page-content-wrap { max-width: 820px; margin: 0 auto; padding: 64px 24px; }
.page-content { color: var(--muted); line-height: 1.8; }
.page-content h2,.page-content h3 { color: var(--text); margin: 1.5em 0 .5em; }
.page-content p { margin-bottom: 1.2em; }

/* =============================================
   404
   ============================================= */
.not-found { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.not-found h1 { font-size: 8rem; color: var(--blue-light); opacity: .2; }
.not-found h2 { font-size: 2rem; margin-bottom: 16px; }
.not-found p { color: var(--muted); margin-bottom: 32px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav,.nav-cta .btn { display: none; }
  .hamburger { display: flex; }
  .hero-stats { gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  h1 { font-size: 2rem; }
  section { padding: 64px 0; }
}

/* =============================================
   WP CORE FIX
   ============================================= */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 6px; }
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
