/* Base Styles & CSS Variables */
:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --secondary: #0d9488;
  --accent: #f59e0b;
  --dark: #0f172a;
  --gray-dark: #334155;
  --gray-muted: #64748b;
  --gray-light: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
  --radius: 16px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--dark);
  background-color: #f8fafc;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
}

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

.brand-logo {
  height: 52px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--gray-muted);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  color: var(--gray-dark);
  transition: var(--transition);
  padding: 6px 0;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--dark);
  cursor: pointer;
}

/* Page Header / Hero */
.hero {
  padding: 60px 0;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--dark);
}

.hero-description {
  font-size: 1.15rem;
  color: var(--gray-dark);
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-image-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-image-wrapper img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.page-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Stats Section */
.stats {
  padding: 40px 0;
  background: var(--white);
  box-shadow: var(--shadow);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--gray-muted);
  font-weight: 500;
}

/* Section Common */
.section {
  padding: 60px 0;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 12px;
  color: var(--dark);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-muted);
  max-width: 650px;
  margin: 0 auto 40px auto;
  font-size: 1.05rem;
}

/* Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

/* Service Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #e2e8f0;
}

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

.card-icon {
  width: 50px;
  height: 50px;
  background: #e0f2fe;
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.card-text {
  color: var(--gray-muted);
  font-size: 0.95rem;
}

/* Project Card */
.project-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.project-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #fef3c7;
  color: #d97706;
  margin-bottom: 15px;
}

.project-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--gray-dark);
  font-size: 0.98rem;
}

/* Team Card */
.team-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.team-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px auto;
  border: 4px solid #e0f2fe;
}

.team-name {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--dark);
}

.team-role {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* News Post Card & Feed */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.news-header {
  padding: 25px 30px 15px 30px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--gray-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.news-title {
  font-size: 1.5rem;
  color: var(--dark);
  line-height: 1.3;
}

.news-media {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}

.news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 30px;
}

.news-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.news-content {
  padding: 20px 30px 30px 30px;
  color: var(--gray-dark);
  font-size: 1.05rem;
}

/* Contacts Layout */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info-card {
  background: var(--white);
  padding: 35px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: #e0f2fe;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text h4 {
  font-size: 1rem;
  color: var(--gray-muted);
  margin-bottom: 4px;
}

.contact-text p, .contact-text a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
}

.social-vk { background: #0077ff; }
.social-ig { background: #e1306c; }
.social-tg { background: #24a1de; }

.form-card {
  background: var(--white);
  padding: 35px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.map-container {
  width: 100%;
  height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 40px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
.footer {
  background: var(--dark);
  color: #94a3b8;
  padding: 50px 0 20px 0;
}

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

.footer-brand {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  max-width: 400px;
  font-size: 0.95rem;
}

.footer-title {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 15px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* Responsive Breakpoints */

/* Responsive Breakpoints & Mobile Navigation Fix */
@media (max-width: 900px) {
  .header-container {
    position: relative;
    padding: 12px 20px;
  }

  .nav-toggle {
    display: block !important;
    background: #e0f2fe;
    color: var(--primary);
    border: none;
    font-size: 1.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid var(--primary);
    z-index: 10000;
  }

  .nav-menu.active {
    display: flex !important;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
  }

  .nav-menu .nav-link {
    display: block;
    padding: 10px 0;
    font-size: 1.1rem;
  }

  .nav-menu .btn {
    display: block;
    width: 100%;
    margin-top: 10px;
  }

  .hero-grid, .contacts-grid, .footer-grid {
    grid-template-columns: 1fr;
  }

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