/* ============================================
   Beztranshey.ru — ООО "Микрощит"
   Corporate website styles
   ============================================ */

:root {
  --color-primary: #001845;
  --color-primary-light: #002a6b;
  --color-accent: #FF6B1A;
  --color-accent-hover: #e55a0a;
  --color-light: #F8F9FA;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-white: #ffffff;
  --color-border: #e0e0e0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --header-height: 72px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  color: var(--color-primary);
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-narrow {
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-primary);
  height: var(--header-height);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-accent);
}

.logo-icon {
  font-size: 1.6rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: var(--color-accent);
}

.header-phone {
  flex-shrink: 0;
}

.header-phone a {
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.header-phone a:hover {
  color: var(--color-accent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  overflow: hidden;
  margin-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.02) 40px,
      rgba(255, 255, 255, 0.02) 80px
    );
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 800px;
}

.hero h1 {
  color: var(--color-white);
  font-size: 3rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 5rem 0;
}

.section-light {
  background: var(--color-light);
}

.section-dark {
  background: var(--color-primary);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-title-left {
  text-align: left;
}

.section-title-left::after {
  margin: 0.75rem 0 0;
}

.section-title-light {
  color: var(--color-white);
}

.subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  margin-top: 0.5rem;
}

/* ============================================
   Highlights (services on homepage)
   ============================================ */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.highlight-card {
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.highlight-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.highlight-card h3 {
  margin-bottom: 0.75rem;
}

.highlight-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ============================================
   About preview
   ============================================ */
.about-preview {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-preview-text p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.about-preview-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stat {
  background: var(--color-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  border-left: 4px solid var(--color-accent);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ============================================
   Cards
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
}

.card-img-placeholder {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
}

.card-body h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.card-meta {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tag {
  display: inline-block;
  background: var(--color-light);
  color: var(--color-text);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-accent {
  background: rgba(255, 107, 26, 0.1);
  color: var(--color-accent);
}

/* ============================================
   Portfolio filters
   ============================================ */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 30px;
  background: var(--color-white);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-family);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

/* ============================================
   Project detail
   ============================================ */
.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--color-light);
  border-radius: var(--radius-lg);
}

.meta-item {
  font-size: 0.95rem;
}

.meta-item strong {
  color: var(--color-primary);
}

.project-photo-placeholder {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  height: 400px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 4rem;
  margin-bottom: 2rem;
}

.project-photo-placeholder p {
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* ============================================
   Page hero
   ============================================ */
.page-hero {
  background: var(--color-primary);
  padding: 6rem 0 3rem;
  margin-top: var(--header-height);
  text-align: center;
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.page-content {
  padding: 4rem 0;
}

/* ============================================
   Services page
   ============================================ */
.service-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: all var(--transition);
  align-items: start;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-accent), #ff8a47);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-white);
  flex-shrink: 0;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.service-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ============================================
   Contacts page
   ============================================ */
.contacts-persons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.person-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.person-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 2rem;
}

.person-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.person-card .role {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.person-card .phone {
  font-size: 1.05rem;
  font-weight: 600;
}

.person-card .phone a {
  color: var(--color-primary);
}

/* Contacts block on homepage */
.contacts-block {
  color: var(--color-white);
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.contact-item h4 {
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.contact-item p {
  color: rgba(255, 255, 255, 0.85);
}

.contact-item a {
  color: rgba(255, 255, 255, 0.85);
}

.contact-item a:hover {
  color: var(--color-accent);
}

/* Map */
.map-container {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ============================================
   About page
   ============================================ */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-white);
  margin-left: -5px;
}

.timeline-year {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.equipment-card {
  background: var(--color-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--color-accent);
}

.equipment-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.equipment-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--color-primary);
  padding: 4rem 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-col h4 {
  color: var(--color-white);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
  position: relative;
}

.footer-col h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 0.5rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
  font-size: 0.95rem;
}

.footer-col ul li a:hover {
  color: var(--color-accent);
}

.footer-col p {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ============================================
   Cookie Consent
   ============================================ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-consent.visible {
  transform: translateY(0);
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-consent p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 0;
}

.cookie-consent a {
  color: var(--color-accent);
}

.cookie-consent .btn {
  flex-shrink: 0;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

/* ============================================
   Content typography
   ============================================ */
.page-content h2 {
  margin: 2rem 0 1rem;
}

.page-content h3 {
  margin: 1.5rem 0 0.75rem;
}

.page-content ul, .page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.4rem;
}

.page-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
  .highlights {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-preview {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-preview-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contacts-persons {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .equipment-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .service-icon {
    margin: 0 auto;
  }

  .service-specs {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero {
    min-height: 70vh;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
  }

  .header-phone {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .about-preview-stats {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }

  .page-hero {
    padding: 4rem 0 2rem;
  }

  .cookie-consent-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .project-photo-placeholder {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
  }
}
