:root {
  --dark: #002B52;
  --accent: #0b5fa8;
  --muted: #6c7580;
  --bg: #f4f6fb;
  --card: #fff;
  --logo-size: 160px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  margin: 0;
  background: var(--bg);
  color: #122;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.site-header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 6px 18px rgba(11,59,102,0.08);
}

.icon {
  width: 30px;
  height: 30px;
  vertical-align: middle;
  margin-right: 8px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-mark {
  background: transparent;
  color: #fff;
  font-weight: 800;
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-nav a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.18s, transform 0.12s;
}

.site-nav a:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.site-nav a.active {
  background: rgba(255,255,255,0.12);
}

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

.lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
  color: #fff;
  font-weight: 600;
  transition: all 0.15s;
}

.lang-btn img {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  display: block;
}

.lang-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(11,59,102,0.12);
}

.lang-btn.active {
  background: #fff;
  color: var(--dark);
  border-color: transparent;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.contact-block {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.contact-block a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.contact-block a:hover {
  text-decoration: underline;
}

.social-row {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.social-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f1f1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.social-btn img {
  width: 24px;
  height: 24px;
}

.social-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.social-btn.tg:hover { background: #0088cc; }
.social-btn.wa:hover { background: #25d366; }
.social-btn.ig:hover { background: #e1306c; }
.social-btn.vk:hover { background: #4C75A3; }
.social-btn.fb:hover { background: #1877F2; }
.social-btn.ok:hover { background: #EE8208; }

@media (max-width: 768px) {
  .site-nav {
    display: none;
    flex-direction: column;
    background: var(--dark);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 10px 0;
    opacity: 0;
    transform: translateY(-10px);
  }

  .site-nav.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-toggle {
    display: block;
  }

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

@media (min-width: 769px) {
  .site-nav {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
  }

  .nav-toggle {
    display: none;
  }
}

.hero {
  background: linear-gradient(180deg, rgba(11,59,102,0.98), rgba(11,95,168,0.98));
  color: #fff;
  padding: 40px;
  border-radius: 16px;
  margin: 30px 0;
  text-align: center;
  box-shadow: 0 8px 24px rgba(11,59,102,0.15);
}

.hero h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.hero p {
  opacity: 0.9;
  margin: 12px 0 0;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: #fff;
  color: var(--dark);
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 16px;
  box-shadow: 0 8px 30px rgba(11,59,102,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(11,59,102,0.2);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.card {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16,24,40,0.04);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
  animation: fadeIn 0.5s ease-out;
}

.project-item {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16,24,40,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(16,24,40,0.2);
}

.project-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-item .descr {
  padding: 16px;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.project-item .descr p {
  margin: 0;
  opacity: 0.9;
}

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

.news-item {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16,24,40,0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-swiper, .project-swiper {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.news-swiper.no-image {
  display: none;
}

.news-swiper .swiper-slide img, .project-swiper .swiper-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.news-content {
  padding: 12px;
}

.news-content h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.news-content p {
  margin: 8px 0;
  opacity: 0.9;
}

.read-more {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
}

.read-more:hover {
  text-decoration: underline;
}

.news-swiper .swiper-button-prev,
.news-swiper .swiper-button-next {
  color: var(--accent);
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
}

.news-swiper .swiper-button-prev {
  left: 10px;
}

.news-swiper .swiper-button-next {
  right: 10px;
}

.news-swiper .swiper-pagination {
  bottom: 10px;
}

.news-swiper .swiper-pagination-bullet {
  background: var(--muted);
}

.news-swiper .swiper-pagination-bullet-active {
  background: var(--accent);
}

@media (min-width: 768px) {
  .news-container {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }

  .news-swiper {
    flex: 1;
  }

  .news-content {
    flex: 1;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .news-list {
    grid-template-columns: 1fr;
  }

  .news-swiper .swiper-slide img {
    height: 180px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-item img {
    height: 200px;
  }
}

@media (max-width: 600px) {
  .news-swiper .swiper-slide img {
    height: 150px;
  }

  .news-content h3 {
    font-size: 1.1rem;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .project-item img {
    height: 180px;
  }
}

.footer {
  background: var(--dark);
  color: #fff;
  width: 100%;
  padding: 32px 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 0 40px;
  box-sizing: border-box;
}

.footer-brand strong {
  font-size: 18px;
  display: block;
}

.footer-company {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 400px;
}

.footer-company-logo {
  height: 80px;
  border-radius: 6px;
}

.footer-company-text {
  font-size: 16px;
  color: #f1f1f1;
  line-height: 1.4;
}

.footer-rights {
  opacity: 0.9;
  font-size: 14px;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-company {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .footer-company-logo {
    height: 70px;
  }

  .footer-rights {
    margin-top: 15px;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 24px 12px;
  }

  .lang-btn img {
    width: 18px;
    height: 12px;
  }

  .lang-btn {
    padding: 6px 8px;
    font-size: 0.85rem;
  }

  header {
    padding: 12px 8px;
  }

  #adminFloatBtn {
    right: 14px;
    bottom: 14px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  background: rgba(0,0,0,0.45);
  padding: 20px;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: #fff;
  max-width: 420px;
  width: 100%;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(2,6,23,0.2);
  position: relative;
  font-family: inherit;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #444;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 20px;
}

.modal-content input[type="password"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  margin-bottom: 12px;
  font-size: 15px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  background: #2a6df4;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #ccc;
  color: #333;
}

.login-error {
  color: #b00020;
  margin-top: 10px;
  min-height: 1.2em;
}

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

a {
  color: #2a6df4;
}

.btn-login {
  background-color: #1e4ed8;
  color: white;
  padding: 8px 14px;
  margin-left: 10px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}

.btn-login:hover {
  background-color: #163bb5;
}

header .logo img {
  height: var(--logo-size);
  width: auto;
}

html, body {
  height: 100%;
  margin: 0;
}

.admin-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.admin-image-item button {
  margin-top: 5px;
  padding: 4px 8px;
  font-size: 12px;
}

.small {
  padding: 4px 8px;
  font-size: 12px;
}

.project-swiper .swiper-slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Стили для модального окна увеличения изображения */
.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1400;
  background: rgba(0,0,0,0.85);
  padding: 20px;
}

.image-modal[aria-hidden="false"] {
  display: flex;
}

.image-modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content .swiper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.image-modal-content .swiper-slide img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  margin: auto;
}

.image-modal-close {
  position: absolute;
  top: -30px;
  right: -30px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1450;
}

.image-modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.image-modal .swiper-button-prev,
.image-modal .swiper-button-next {
  color: #fff;
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
}

.image-modal .swiper-button-prev {
  left: 10px;
}

.image-modal .swiper-button-next {
  right: 10px;
}

.image-modal .swiper-pagination {
  bottom: 10px;
}

.image-modal .swiper-pagination-bullet {
  background: #fff;
}

.image-modal .swiper-pagination-bullet-active {
  background: var(--accent);
}

@media (max-width: 600px) {
  .image-modal-close {
    top: -20px;
    right: -20px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .project-swiper .swiper-slide img {
    height: 180px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}