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

/* Page background + global text */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
  background-color: #020617;
  background-image: url("images/background.jpg");
  background-size: cover;
  background-position: top left;
  background-repeat: no-repeat;
  color: #e5e7eb;
}

.page {
  max-width: 820px;          /* slightly narrower overall */
  margin: 24px 0 40px 24px;  /* top | right | bottom | left */
  padding: 0 24px 40px 0;    /* right padding only, no left */
}

/* Language switch (bottom-left) */
.language-switch {
  text-align: left;
  margin-top: 24px;
  font-size: 0.9rem;
}

.language-switch a {
  text-decoration: none;
  color: #cbd5ff;
  margin-left: 0;      /* no horizontal offset */
  margin-right: 6px;   /* spacing between keys */
}

.language-switch a.active {
  font-weight: 600;
  color: #f9fafb;
}

.language-switch img {
  height: 70px;        /* same height for Eng + Contact */
  width: auto;         /* keep aspect ratio */
  display: block;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.language-switch a {
  display: inline-block;
}

/* Hover: key moves slightly down and brightens */
.language-switch a:hover img {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  filter: brightness(1.08);
}

/* Click (active): pressed further in */
.language-switch a:active img {
  transform: translateY(4px) scale(0.97);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  filter: brightness(1.05);
}

/* Hover: key moves slightly down and brightens */
.language-switch a:hover img {
  transform: translateY(2px) scale(0.985);  /* a bit more movement for 70px */
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  filter: brightness(1.08);
}

/* Click (active): pressed further in */
.language-switch a:active img {
  transform: translateY(4px) scale(0.97);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  filter: brightness(1.05);
}

/* Top section: text left, image right */
.top {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 50px;  /* more breathing room */
}

.top-text {
  flex: 5;               /* was 4 */
  font-size: 0.9rem;
}

.top-text p {
  margin-top: 0rem;
  max-width: none;       /* was 900px */
}

.top-image {
  flex: 1.2;             /* was 1.5 */
  display: flex;
  justify-content: flex-end;
  align-items: flex-start; /* make the image sit at the top */
}

/* Name at the start of the paragraph */
.top-text .name {
  font-weight: 700;
  color: #262d63;  /* keep the colour */
}

/* Right-hand image */
.top-image {
  flex: 1.5;
  display: flex;
  justify-content: flex-end;
}

.top-image img {
  width: 150px;          /* was 180px */
  height: 150px;         /* was 180px */
  object-fit: cover;
  border-radius: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin-top: 3px; 
}

/* Bottom text block (lists) */
.bottom-text {
  font-size: 0.7rem;  /* slightly smaller */
  margin-bottom: 100px;   /* more breathing room above language switch */
}

.section + .section {
  margin-top: 16px;
}

.section-title {
  font-weight: 700;   /* stronger bold */
  margin-bottom: 4px;
}

.contact-heading {
  font-size: 0.9rem;      /* same as .top-text font size */
  font-weight: 400;       /* normal, not bold */
  margin-bottom: 8px;
  color: #e5e7eb;         /* same white as the top text */
}

ul {
  margin-left: 1.2rem;
  margin-top: 2px;
}

li {
  margin-bottom: 2px;
}

/* Emphasised titles */
em {
  font-style: italic;
}

/* Real links, if you add any later */
a {
  color:  inherit;  
  text-decoration: underline;
}

a:hover {
  color: #bf3004;          /* hover colour */
  text-decoration: underline;
}

/* Use stars instead of default bullets in the main text box */
.bottom-text ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.bottom-text li {
  position: relative;
  padding-left: 0.5rem;
}

.bottom-text li::before {
  content: "*";
  position: absolute;
  left: 0;
}
/* Contact form styling */
.contact-form {
  margin-top: 8px;
  max-width: 480px;
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 0.7rem;   /* match bottom text box */
  font-weight: 400;
  margin-bottom: 4px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 6px 8px;
  border-radius: 3px;
  border: 1px solid rgba(229, 231, 235, 0.5);
  background: rgba(15, 23, 42, 0.7);  /* semi-dark, to match the theme */
  color: #e5e7eb;
  font-family: inherit;
  font-size: 0.8rem;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #bf3004;   /* your accent colour */
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  margin-top: 12px;
}

/* Reset default button look – we'll style via the image */
.send-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

/* Send key image */
.send-button img {
  height: 70px;        /* same height as Eng/Rus/Contact keys */
  width: auto;
  display: block;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

/* Hover: press effect, like the language keys */
.send-button:hover img {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
  filter: brightness(1.08);
}

/* Active: pressed further in */
.send-button:active img {
  transform: translateY(4px) scale(0.97);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  filter: brightness(1.05);
}

/* Unified Mobile Optimization (Tablets & Phones) */
@media screen and (max-width: 768px) {
  /* Main Container Adjustments */
  .page {
    margin: 16px; /* Simplifies your old 16px 0 24px 16px for a centered look */
    padding: 0 0 24px 0; 
    width: auto; /* Ensures it doesn't stretch past the screen edge */
  }

  /* Stack the header/top section vertically */
  .top {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers your content when stacked */
    text-align: center;
  }

  /* Top Image handling from your old code */
  .top-image {
    display: flex;
    justify-content: center; /* Changed from flex-start to center for better mobile balance */
    margin-bottom: 20px;
  }

  .top-image img {
    max-width: 80%; /* Increased from 60% for better visibility on small screens */
    height: auto;
  }

  /* Global Mobile font and form fixes */
  body {
    font-size: 16px; /* Prevents iOS from auto-zooming on text fields */
    line-height: 1.5;
  }

  input, textarea, button {
    width: 100%; /* Ensures the contact form doesn't "leak" off the side */
    box-sizing: border-box;
  }
}

