:root {
  --blue: #5AA8EE;
  --dark: #1f2326;
  --muted: var(--white); /*  для контактов */
  --bg: #001426; /* фон блоков, хедера и футера */
  --white: #ffffff;
  --max-width: 1100px;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  --glass: rgba(255, 255, 255, 0.08);
}

/* логотип */
.brand .logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Arial, Helvetica, sans-serif;
  
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--blue); 
  background-attachment: fixed;
  position: relative; 
}

/* container */
.container {
  max-width: var(--max-width);
  margin: 28px auto;
  padding: 0 20px;
}

/* Контейнер контента */
#content.container {
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding-top: 30px; 
}

/* header */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.header .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 16px; margin: 0; color: white; }
.nav { display: flex; gap: 12px; align-items: center; }
.nav a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #dcefff;
  font-weight: 600;
}
.nav a.active,
.nav a:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  color: var(--blue);
}

/* content */
.page {
  flex: 1; 
  background: var(--bg); 
  padding: 28px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
  color: white;
  text-align: center;
}
.page h2, .page h3, .page h4, .page p { color: white; }

/*Заголовки */
.page h2 { margin: 0 0 12px; }
.page h3 { margin: 28px 0 16px; }

.h2-lg { font-size: 32px; }
.h2-md { font-size: 26px; }
.h2-sm { font-size: 20px; }

.h3-lg { font-size: 28px; }
.h3-md { font-size: 22px; }
.h3-sm { font-size: 18px; }

/* cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.card {
  background: #102542;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #22314a;
  color: white;
}

/* services */
.service-item h3 { margin: 0 0 4px 0; color: white; }
.service-item p { margin: 0; color: var(--muted); }

/* posts */
.post-list a {
  display: block;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  border: 1px solid #22314a;
  margin-bottom: 10px;
  background: #102542;
}
.post-list a:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  transition: all .15s;
}

/* footer */
.site-footer {
  background: var(--bg);
  color: white;
  padding: 16px 0 0; 
  font-size: 14px;
  margin-top: auto;
  
  position: relative;
  z-index: 9999; 
}

.site-footer .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 16px;

  display: flex;
  gap: 40px; 
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center; 
  text-align: center ;
}


.footer-col {
  min-width: 250px; 
  flex-grow: 1; 
  flex-basis: 250px;
}

.footer-col h4 {
  margin: 0 0 6px 0;
  color: white;
  font-size: 24px;
  text-align: center;
}

.footer-contact p,
.footer-col > p { 
  margin: 4px 0;
  color: var(--white); 
  white-space: nowrap; 
}

.site-footer a.footer-link {
  color: var(--white);
  text-decoration: none;
  position: relative; 
  z-index: 10000;
  pointer-events: auto;
}
.site-footer a.footer-link:hover {
  text-decoration: underline;
}

.social-col .social-links {
  display: flex;
  justify-content: center; 
  gap: 12px;
  font-size: 22px;
  margin-bottom: 12px;
}

/* Дополнительные стили для каждой иконки */
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: var(--glass); 
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  font-size: 20px;    
  transition: all 0.3s ease;
}

.social-links a img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block; 
}

/*hover*/
.social-links a:hover {
  background: var(--blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 168, 238, 0.4);
}

.footer-divider {
  margin: 20px auto 10px;
  width: 50%;
  height: 1px;
  background-color: transparent; 
  border: none;
  border-top: 1px solid #1a3a6b;
}

/* map */
.map {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #22314a;
  margin-top: 12px;
}

/* modal */
.modal {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.3s, opacity 0.3s ease-out;
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.modal-panel {
  position: relative;
  background: #102542;
  border-radius: 12px;
  max-width: 720px;
  width: 96%;
  padding: 20px;
  z-index: 10;
  box-shadow: var(--shadow);
  color: white;
  transition: transform 0.3s ease-out;
  transform: scale(0.95);
}
.modal[aria-hidden="false"] .modal-panel {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  background: transparent;
  color: #aaa;
  font-size: 24px;
  border: none;
  cursor: pointer;
}
.contact-form label {
  display: block;
  text-align: center;
  margin-bottom: 12px;
  font-size: 14px;
}
.contact-form label span {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #334a6a;
  background: #001426;
  color: white;
  font-size: 16px;
  resize: none;
  transition: border-color 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.contact-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.contact-form .note {
  font-size: 12px;
  color: #777;
  text-align: right;
  margin-top: 10px;
}

.modal-panel .form-message.success {
  background: #28a745;
}
.modal-panel .form-message.error {
  background: #dc3545;
}

/* buttons */
.btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}
.btn.primary {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
}
.btn.primary:hover {
  background: #0959b3;
}
.btn.outline {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--blue);
}
.btn.outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* lang select */
.lang-select {
  position: relative;
  width: 120px;
  text-align: center;
  user-select: none;
  z-index: 10;
}
.lang-select .selected {
  padding: 8px 14px;
  background: var(--bg); 
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-select .selected:hover {
  background: #1a3a6b;
}
.lang-select .options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg); 
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.15s ease-in;
}
.lang-select.active .options { display: flex; }
.lang-select .options div {
  padding: 8px 14px;
  color: #fff;
  transition: background 0.15s ease;
  cursor: pointer;
}
.lang-select .options div:hover {
  background-color: #1a3a6b;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/*Анимации смены контента*/
#content {
  transition: opacity 0.5s ease-out; 
}
.content-loading {
  opacity: 0;
}
@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  opacity: 0; 
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translateY(10px);
}
#scroll-to-top:hover {
  background: #0959b3; 
}
#scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/*Стили для страницы "О Нас"*/

.page .main-text,
.page .team-description,
.page .note { 
  max-width: 900px;
  margin: 0 auto 20px; 
  text-align: center; 
}


/*"Наши ценности" и "Команда*/
.page h2,
.page h3.section-title {
  font-size: 32px; 
}
.page h3.section-title {
  margin: 28px 0 16px; 
}

.category-title-mod {
    font-size: 28px; 
}

.values {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px; 
  max-width: 900px;
  text-align: center;
}
.values li {
  margin-bottom: 24px;
  line-height: 1.4;
}

.values li > br {
  display: none; 
}

/*"Качество и надежность" и т.д.*/
.values span:not(.muted) { 
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    font-size: 18px; 
    color: var(--white);
}

/*"ключевые принципы*/
.values .muted {
    font-weight: normal;
    display: block;
    margin: 0 auto; 
    text-align: center; 
    max-width: 750px;
    color: #bbbbbb;
}

#team-description {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px; 
}

.job-category {
  margin: 0 auto 28px;
  max-width: var(--max-width);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 0 28px 28px;
}
.job-category:first-of-type {
  margin-top: 28px; 
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  color: white;
  border-bottom: 1px solid #1a3a6b;
  margin-bottom: 12px;
}
.job-category:last-of-type .category-header {
  border-bottom: 1px solid #1a3a6b;
  margin-bottom: 12px;
}
.category-header:hover {
  opacity: 0.8;
}

/* Заголовок внутри хедера */
.category-title {
  margin: 0 !important;
  font-size: 26px;
  font-weight: 600;
  text-align: left;
}

/* Иконка раскрытия */
.expand-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.category-header[aria-expanded="false"] .expand-icon {
  transform: rotate(-90deg);
}

.category-content {
  overflow: hidden;
  max-height: 2000px;
  transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.category-content[aria-hidden="true"] {
  max-height: 0;
  opacity: 0;
}

.job-category .grid {
  margin-left: 0;
  margin-right: 0;
}

#it-tech-content .grid {
  grid-template-columns: repeat(2, 1fr); 
}

@media (max-width: 600px) {
  #it-tech-content .grid {
    grid-template-columns: 1fr;
  }
}