:root {
  --primary: #003366;
  --accent: #00509e;
  --bg-light: #f3f6fb;
  --text: #222;
}

body {
  font-family: "Segoe UI", "Roboto", sans-serif;
  margin: 0;
  background-color: #fff;
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

header {
  background-color: var(--primary);
  color: #fff;
  padding: 0.8em 0.8em;
}

header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

header .logo img {
  height: 50px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 0;
  margin: 10px 0 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.3s;
}

nav a:hover,
nav a.active {
  background: var(--accent);
}

main {
  padding: 2em 8%;
}

h1, h2, h3 {
  color: var(--primary);
  margin-top: 1.2em;
  margin-bottom: 0.5em;
}

p {
  margin-bottom: 1em;
  text-align: justify;
}

.btn {
  background: var(--primary);
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  display: inline-block;
}

.btn:hover {
  background: var(--accent);
}

.cta, .summary {
  background: var(--bg-light);
  padding: 1.8em;
  border-radius: 10px;
  margin-top: 2em;
  border-left: 5px solid var(--primary);
  text-align: center;
}


footer {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 1em;
  font-size: 0.95em;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

table th, table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

table th {
  background-color: var(--bg-light);
  font-weight: 600;
}


@media (max-width: 992px) {
  main {
    padding: 1.5em 5%;
  }
  nav ul {
    gap: 10px;
  }
  h1 {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  header .logo {
    flex-direction: column;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav a {
    display: block;
    width: 100%;
    text-align: center;
  }
  main {
    padding: 1.2em 1.2em;
  }
  h1 {
    font-size: 1.6em;
  }
  h2 {
    font-size: 1.4em;
  }
  p {
    font-size: 0.95em;
  }
  .btn {
    padding: 10px 18px;
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.4em;
  }
  nav a {
    padding: 10px;
  }
  footer {
    font-size: 0.85em;
  }
}

section h3 {
  color: #003366;
  margin-top: 1.8em;
}

section p {
  text-align: justify;
}

.summary {
  background: #f3f6fb;
  border-left: 5px solid #003366;
  padding: 1.5em;
  border-radius: 10px;
  margin-top: 2em;
}

.summary h3 {
  margin-top: 0;
  text-align: center;
}

section h3 {
  color: #003366;
  margin-top: 1.6em;
}
.summary {
  background: #f3f6fb;
  border-left: 4px solid #003366;
  padding: 1.5em;
  border-radius: 8px;
  margin-top: 2em;
}

img[alt="Логотип CTRgroup"] {
  display: block;        
  margin: 0 auto;         
  max-width: 180px;      
  height: auto;          
  padding: 10px 0;       
}

.contact-form {
  background: #f3f6fb;
  padding: 2em;
  border-radius: 10px;
  max-width: 600px;
  margin: 2em auto;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
  text-align: center;
  color: #003366;
  margin-bottom: 1em;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.contact-form label {
  font-weight: 600;
  color: #003366;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #00509e;
  box-shadow: 0 0 3px rgba(0, 80, 158, 0.3);
}

.contact-form .btn {
  background: #003366;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  transition: background 0.3s ease;
}

.contact-form .btn:hover {
  background: #00509e;
}

@media (max-width: 600px) {
  .contact-form {
    padding: 1.2em;
  }
}

#random-article {
  margin-top: 1em;
  font-size: 0.95em;
}

#random-article a {
  color: #ffd700;
  text-decoration: none;
}

#random-article a:hover {
  text-decoration: underline;
}
