/* ===== Base Styles ===== */

/* Campaign Grotesk Font Faces */
@font-face {
  font-family: 'campaign_groteskregular';
  src: url('../fonts/campaign_regular-webfont.woff2') format('woff2'),
       url('../fonts/campaign_regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'campaign_groteskmedium';
  src: url('../fonts/campaign_medium-webfont.woff2') format('woff2'),
       url('../fonts/campaign_medium-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'campaign_groteskbold';
  src: url('../fonts/campaign_bold-webfont.woff2') format('woff2'),
       url('../fonts/campaign_bold-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  --bg-primary: #25283b;
  --bg-secondary: #1b1d25;
  --bg-deep: #0f1220;
  --grad-purple: #3d4167;
  --grad-dark: rgba(18, 20, 33, 0.96);
  --accent: #2bb2ff;
  --accent-alt: #1398ff;
  --text-primary: #ffffff;
  --text-secondary: #dfe3f1;
  --text-muted: #656791;
  --text-link: #a4a8f2;
  --text-link-hover: #6168e8;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}


body {
  font-family: "campaign_groteskregular", sans-serif;
  font-weight: 400;
  line-height: 1.56;
  color: var(--text-primary);
  background: #25283b;
  background: linear-gradient(to bottom, #25283b 0%, #25283b 50%, #1b1d25 100%);
  overflow-x: hidden;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a:hover {
  color: var(--text-link-hover);
}

/* ===== Header ===== */
.site-header {
  position: relative;
  width: 100%;
  min-height: 140px;
  padding-top: 40px;
  padding-bottom: 24px;
  background: #25283b;
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 140px;
  background: linear-gradient(to right, rgba(61, 65, 103, 0) 0%, rgba(61, 65, 103, 0.6) 50%, #3d4167 94%, #3d4167 100%);
  z-index: 1;
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 0 clamp(16px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: block;
  position: relative;
  z-index: 3;
}

.logo img {
  height: 214.56px;
  width: auto;
  display: block;
  transform: translateY(47.6px);
  transition: transform 0.3s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

/* Desktop nav - hide mobile nav, show desktop-nav */
@media (min-width: 768px) {
  /* Hide mobile fullscreen menu on desktop */
  .main-nav {
    display: none !important;
  }

  /* Hide hamburger on desktop */
  .hamburger-toggle {
    display: none !important;
  }

  /* Desktop navigation - inside header, scrolls with page */
  .desktop-nav {
    display: flex;
    gap: 27px;
    align-items: center;
    margin-top: -160px;
  }

  .desktop-nav a {
    position: relative;
    color: var(--text-primary);
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 400;
    letter-spacing: 0.2px;
  }

  .desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(
      to right,
      rgba(61, 65, 103, 0.2) 0%,
      rgba(59, 69, 111, 0.2) 5%,
      #1398ff 100%
    );
    transition: width 0.3s ease;
  }

  .desktop-nav a:hover::after,
  .desktop-nav a.active::after {
    width: 100%;
  }
}

/* Mobile - hide desktop nav, show hamburger */
@media (max-width: 767px) {
  .desktop-nav {
    display: none !important;
  }
}

/* Hide close button on desktop */
.nav-close {
  display: none;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 48px;
  align-items: center;
}

.main-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.2px;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--accent);
}

.main-nav a.active {
  color: var(--text-primary);
}


/* ===== Main Content ===== */
main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 400px);
  padding: 60px 0 0;
  background: #25283b;
  background: linear-gradient(to bottom, #25283b 0%, #25283b 50%, var(--bg-secondary) 100%);
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 0;
  border-top: none;
}

.container,
.container-wider {
  position: relative;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  max-width: 1300px;
  padding-right: 10px;
  padding-left: 10px;
  z-index: 2;
}

@media (min-width: 992px) {
  .container,
  .container-wider {
    padding-right: 40px;
    padding-left: 40px;
  }
}

.container-fullwidth {
  position: relative;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 10px;
  padding-left: 10px;
}

@media (min-width: 992px) {
  .container-fullwidth {
    padding-right: 40px;
    padding-left: 40px;
  }
}

.content {
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: left;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  color: var(--text-primary);
  margin-top: 2em;
  margin-bottom: 1em;
}

.content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

.content h2 {
  font-size: 2rem;
  line-height: 1.3;
}

.content h3 {
  font-size: 1.5rem;
}

.content p {
  margin-bottom: 1.5em;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero {
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.post-body {
  max-width: 800px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  margin-bottom: 0;
  text-align: left;
}

body:has(.services-grid-page) .post-body {
  max-width: 1200px;
}

.post-body > *:last-child {
  margin-bottom: 0;
}

.content > *:last-child {
  margin-bottom: 0;
}

time {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.content a {
  color: var(--accent);
}

.content a:hover {
  color: var(--accent-alt);
}

.content ul,
.content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.content ul li,
.content ol li {
  margin-bottom: 0.5em;
  color: var(--text-secondary);
}

.content ul li {
  list-style-type: disc;
}

.content ol li {
  list-style-type: decimal;
}

.content strong,
.content b {
  font-family: "campaign_groteskbold", sans-serif;
  font-weight: normal;
  color: #a4a8f2;
}

.content em {
  font-style: italic;
}

/* ===== About Page ===== */
body:has(.about-header) .container {
  margin: 0 clamp(40px, 10vw, 310px) 80px;
  padding: 40px 40px 0;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1920px) {
  body:has(.about-header) .container {
    margin-left: 310px;
    margin-right: 310px;
  }
}

body:has(.about-header) .container .content {
  max-width: 1080px;
  margin: 0 auto;
}



body:has(.switch2porting-header) .container .content {
  max-width: 1080px;
  margin: 0 auto;
}




.about-header {
  margin-bottom: 40px;
}

.page-label {
  display: inline-block;
  font-size: 14px;
  color: var(--text-link);
  margin-bottom: 24px;
  font-weight: 400;
}

.page-title {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0;
  font-weight: 600;
  line-height: 1.2;
}

.about-page-label {
  color: #a4a8f2;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.about-page-heading {
  color: #ffffff;
  font-size: 35px;
  line-height: 1.2;
  font-weight: 600;
}

/* ===== Cookie Policy ===== */
.cookie-policy-title {
  font-size: 50px;
  color: #ffffff;
  text-align: left;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  padding: 0;
}

.cookie-policy-body {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.65;
}

.cookie-policy-wrapper {
  max-width: 800px;
  width: 100%;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cookie-policy-body p {
  margin-bottom: 1.35em;
}

.cookie-policy-body > *:last-child {
  margin-bottom: 0;
}

.cookie-policy-body p:last-child {
  margin-bottom: 0;
}

.cookie-policy-body p strong {
  display: block;
  color: #a4a8f2;
  font-size: 16px;
  font-weight: 600;
  margin: 2em 0 0.65em;
}

.cookie-policy-body p strong:first-child {
  margin-top: 0;
}

.cookie-policy-body em {
  display: inline;
  color: #ffffff;
  font-style: italic;
  font-size: 16px;
  margin: 0;
  text-transform: none;
  white-space: normal;
}

.cookie-policy-body a {
  color: #a4a8f2;
  text-decoration: underline;
}

/* ===== About Page Stats ===== */
.about-stats {
  margin: 60px 0;
  width: 100%;
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin: 0;
  width: 100%;
}

.stat-item {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 0 30px;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stat-item img {
  width: 100%;
  max-width: 140px;
  height: auto;
  display: block;
}

.team-photo {
  margin: 60px 0 0 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 0;
  padding-bottom: 0;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

@media (min-width: 576px) {
  .stat-item {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 40px;
  }
  
  .stat-item img {
    max-width: 220px;
  }
}

@media (min-width: 992px) {
  .stats-grid {
    justify-content: center;
  }
  
  .stat-item {
    flex: 0 0 auto;
    max-width: none;
    padding: 0 40px;
    margin-bottom: 60px;
  }
  
  .stat-item img {
    max-width: 280px;
  }
}

@media (max-width: 575px) {
  .stat-item {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    margin-bottom: 30px;
  }
  
  .stat-item img {
    max-width: 100%;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 80px 0 60px;
  margin-top: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: auto;
}

main + .site-footer {
  margin-top: 0;
}

.footer-inner {
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
}

.footer-left {
  flex: 1;
  max-width: 50%;
  margin-left: 0;
  padding-left: 0;
}

.footer-left img {
  max-width: 525px;
  width: auto;
  height: auto;
  display: block;
  margin-left: 0;
}

.footer-right {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-right: clamp(16px, 3vw, 40px);
}

.footer-right p {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.6;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--accent);
}

.footer-highlight-link {
  color: inherit;
  transition: color 0.2s;
}

.footer-highlight-link:hover {
  color: #72749d;
}

.footer-links {
  margin: 8px 0;
  font-size: 12px;
}

.footer-links a {
  color: var(--text-muted);
  margin: 0 4px;
}

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

.socials {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
}

.socials a {
  display: inline-block;
  transition: opacity 0.2s;
}

.socials img {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.socials img:hover {
  opacity: 1;
}

/* ===== Lists ===== */
.post-list,
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.post-item,
.project-item {
  background: var(--bg-secondary);
  /*border-radius: 5px;*/
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.post-item:hover,
.project-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.post-item a,
.project-item a {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
}

.post-item h3,
.project-item h3 {
  margin: 0;
  padding: 20px;
  font-size: 1.25rem;
}

.post-item p,
.project-item p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .footer-left {
    max-width: 100%;
  }
  
  .footer-left img {
    max-width: 500px;
    margin: 0 auto;
  }
  
  .footer-right {
    text-align: center;
    align-items: center;
  }
  
  .socials {
    justify-content: center;
  }
}

/* Footer Mobile Enhancements */
@media (max-width: 767px) {
  .site-footer {
    padding: 40px 0 30px;
  }

  .footer-inner {
    padding: 0 16px;
    flex-direction: column;
    gap: 24px;
  }

  .footer-left img {
    max-width: 280px;
  }

  .footer-right {
    padding-right: 0;
    text-align: center;
  }

  .footer-right p {
    font-size: 13px;
  }

  .socials {
    justify-content: center;
  }

  .socials img {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 575px) {
  .site-footer {
    padding: 32px 0 24px;
  }

  .footer-left img {
    max-width: 200px;
  }

  .footer-right p {
    font-size: 12px;
  }

  .footer-links {
    font-size: 11px;
  }

  .socials img {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 767px) {
  .site-header {
    min-height: 120px;
    padding-top: 20px;
  }
  
  .site-header::after {
    height: 120px;
  }
  
  .logo img {
    height: 144px;
    transform: translateY(34px);
  }
  
  .main-nav ul {
    gap: 24px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .main-nav a {
    font-size: 13px;
  }
  
  .footer-left img {
    max-width: 400px;
  }
}

@media (max-width: 767px) {
  .site-header {
    min-height: 100px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  
  .site-header::after {
    height: 100px;
    display: none;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  
  .logo img {
    width: auto;
    height: 149px;
    transform: none;
  }

  .main-nav {
    margin-top: 0;
    width: 100%;
  }
  
  .main-nav ul {
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .main-nav a {
    font-size: 12px;
  }
  
  .footer-inner {
    padding: 0 16px;
  }
  
  .footer-left img {
    max-width: 100%;
  }
  
  .post-list,
  .project-list {
    grid-template-columns: 1fr;
  }
}

/* ===== Hamburger Menu ===== */
.hamburger-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 2px;
}

/* X animation when open */
.hamburger-toggle.open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-toggle.open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Backdrop */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-backdrop.open {
  display: block;
}

/* Mobile Breakpoint - Tablets and Below */
@media (max-width: 767px) {
  .hamburger-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, #25283b 0%, #1b1d25 100%);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 100px 40px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
    width: 100%;
  }

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

  .main-nav a {
    display: block;
    padding: 16px 0;
    font-size: 24px;
    color: #a4a8f2;
    text-align: center;
  }

  .main-nav a:hover,
  .main-nav a.active {
    color: #ffffff;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Header adjustments */
  .site-header {
    min-height: 80px;
    padding: 12px 0;
  }

  .site-header::after {
    height: 80px;
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
  }

  .logo img {
    height: 149px;
    transform: none;
  }

  /* Non-homepage: logo centered, burger right (absolute) */
  body:not(.homepage) .header-inner {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding-top: 22px;
    position: relative;
  }

  body:not(.homepage) .hamburger-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Transform nav into fullscreen overlay */
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, #25283b 0%, #1b1d25 100%);
    z-index: 1000;
    overflow-y: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 100px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
  }

  /* Close button (X) - show on mobile */
  .nav-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
  }

  .nav-close span {
    display: block;
    position: absolute;
    width: 30px;
    height: 2px;
    background: #ffffff;
    top: 50%;
    left: 50%;
    border-radius: 2px;
  }

  .nav-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .main-nav li {
    width: 100%;
    border-bottom: none;
    text-align: center;
  }

  .main-nav a {
    display: block;
    padding: 16px 0;
    font-size: 25px;
    color: #a4a8f2;
    white-space: normal;
    background: none !important;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 1;
    text-align: center;
  }

  .main-nav a.c-nav-underline {
    display: inline-block;
  }

  .main-nav a:hover,
  .main-nav a:active,
  .main-nav a.active,
  .main-nav a:focus {
    color: #ffffff;
    background: none !important;
    outline: none;
  }

  /* Prevent body scroll when drawer is open */
  body.nav-open {
    overflow: hidden;
  }

  /* Ensure nav links are clickable when drawer is open */
  .main-nav.open {
    pointer-events: auto;
  }

  .main-nav.open ul {
    pointer-events: auto;
  }

  .main-nav.open li {
    pointer-events: auto;
  }
}

/* Extra Small Phones (iPhone SE, etc.) */
@media (max-width: 575px) {
  .site-header {
    min-height: 70px;
    padding: 10px 0;
  }

  .site-header::after {
    height: 70px;
  }

  .header-inner {
    padding: 0 12px;
  }

  .logo img {
    height: 149px;
  }

  .main-nav {
    padding: 70px 16px 32px;
  }

  .main-nav a {
    font-size: 25px;
    color: #a4a8f2;
    padding: 14px 0;
    background: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  .main-nav a:hover,
  .main-nav a:active,
  .main-nav a.active,
  .main-nav a:focus {
    color: #ffffff;
    background: none !important;
    outline: none;
  }
}

/* ===== Utility Classes ===== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 15px !important; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mb-xl-6 {
  margin-bottom: 3rem;
}

@media (min-width: 1200px) {
  .mb-xl-6 {
    margin-bottom: 60px;
  }
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* ===== Services Navigation ===== */
.services-nav {
  margin-bottom: 40px;
  padding-bottom: 20px;
}

.services-nav ul {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}

.services-nav li {
  margin: 0;
  list-style: none !important;
  list-style-type: none !important;
}

.services-nav a {
  font-size: 35px;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s ease;
  display: block;
}

.services-nav a:hover {
  color: var(--text-primary);
}

.services-nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Services navigation - desktop vs mobile */
.services-dd-nav {
  display: none;
}

@media (max-width: 767px) {
  .services-nav-desktop {
    display: none;
  }

  .services-dd-nav {
    display: block;
  }
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 90px 150px;
  margin: 60px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Последний элемент по центру, если не кратно 3 */
.services-grid .service-item:last-child:nth-child(3n+1) {
  grid-column: 2;
}

.service-item {
  text-align: center;
  margin: 0 auto;
  width: 100%;
  /*max-width: auto;*/
  word-break: normal;
}

.service-item__icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-item__icon img {
  width: 150px;
  height: 150px;
  max-width: none !important;
  /*object-fit: contain;*/
}


.service-item h3 {
  /*display: inline-block;*/
  /*font-family: "campaign_groteskregular", sans-serif !important;*/
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 16px;
  color: #A4A8F2;
  max-width: none !important;
  margin-bottom: 30px;
  width: 100%;
  white-space: normal;
  text-align: center;
  word-break: normal;
  hyphens: none;
  overflow-wrap: normal;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .service-item h3 {
    font-size: 16px;
    margin-bottom: 50px;
  }
}

.service-item:hover h3 {
  color: var(--text-primary);
}

/* ===== Blog ===== */
.content:has(.blog-grid) h1 {
  text-align: center;
  margin-bottom: 40px;
}

.blog-categories {
  width: 100%;
  text-align: center;
  background-color: #25283b;
  padding: 15px 10px 30px;
  font-family: "campaign_groteskmedium", sans-serif;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .blog-categories {
    padding-bottom: 40px;
  }
}

@media (min-width: 992px) {
  .blog-categories {
    padding-bottom: 50px;
  }
}

.blog-categories-toggle {
  position: relative;
  display: inline-block;
  color: #595c85;
  cursor: pointer;
  padding-right: 40px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
}

.blog-categories-selected {
  color: #ffffff;
}

.blog-categories-arrow {
  position: absolute;
  top: 10px;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: rotate(135deg);
  transition: border-color 0.18s ease;
}

.blog-categories.open .blog-categories-arrow {
  border-color: #e1acb9;
}

.blog-categories-menu {
  display: none;
  list-style: none;
  margin: 20px auto 0;
  padding: 20px 0;
  max-height: 360px;
  overflow-y: auto;
  width: 100%;
  background: linear-gradient(to bottom, #25283b 0%, rgba(37, 40, 59, 0.85) 87%, rgba(37, 40, 59, 0.85) 100%);
}

@media (min-width: 768px) {
  .blog-categories-menu {
    max-width: 420px;
  }
}

.blog-categories.open .blog-categories-menu {
  display: block;
}

.blog-categories-item + .blog-categories-item {
  margin-top: 8px;
}

.blog-categories-link {
  display: block;
  padding: 0px 24px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.blog-categories-item.active .blog-categories-link,
.blog-categories-link:hover {
  color: #e1acb9;
}

/* Blog listing */
.c-dd-nav {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  text-align: center;
  position: relative;
  width: 100%;
  background-color: #25283b;
  padding-bottom: 20px;
  z-index: 11;
}

@media (min-width: 768px) {
  .c-dd-nav {
    padding-bottom: 30px;
  }
}

@media (min-width: 992px) {
  .c-dd-nav {
    padding-bottom: 40px;
  }
}

.c-dd-nav__current {
  position: relative;
  color: #595c85;
  font-size: 35px;
  cursor: pointer;
  padding-right: 40px;
  display: inline-block;
}

.c-dd-nav__current:after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  width: 12px;
  height: 12px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: rotate(135deg);
  transition: border 0.18s ease-out;
}

@media (min-width: 992px) {
  .c-dd-nav__current:after {
    top: 12px;
  }
}

.c-dd-nav__current:hover:after {
  border-color: #e1acb9;
}

.c-dd-nav__list {
  /*list-style: none;*/
  margin: 0;
  padding: 20px 0;
  /*display: none;*/
  position: absolute;
  left: 0;
  width: 100%;
  background: linear-gradient(to bottom, #25283b 0%, rgba(37, 40, 59, 0.85) 87%, rgba(37, 40, 59, 0.85) 100%);
  max-height: 360px;
  overflow-y: auto;
  z-index: 10;
}

@media (min-width: 768px) {
  .c-dd-nav__list {
    padding-bottom: 30px;
  }
}

@media (min-width: 992px) {
  .c-dd-nav__list {
    padding-bottom: 40px;
  }
}

/*.c-dd-nav.open .c-dd-nav__list,
.c-dd-nav--open .c-dd-nav__list {
  display: block;
}*/

.c-dd-nav__list li + li {
  margin-top: 8px;
}

@media (min-width: 992px) {
  .c-dd-nav__list li + li {
    margin-top: 12px;
  }
}

/* Исходное состояние — меню скрыто */
.c-dd-nav__list {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

.c-dd-nav.c-dd-nav--open .c-dd-nav__list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


.c-dd-nav a {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.38;
  text-decoration: none;
}

.c-dd-nav a:hover,
.c-dd-nav a.active {
  color: #e1acb9;
}

.c-article {
  position: relative;
  display: block;
  width: 100%;
  background: #1b1d25;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.2s ease-out;
}

.c-article:hover {
  transform: translateY(-3px);
}

.c-article__bg {
  width: 100%;
  padding-top: 56.25%;
  background: center center/cover no-repeat;
}

.c-article__content {
  padding: 20px;
  text-align: left;
}

@media (min-width: 1600px) {
  .c-article__content {
    padding: 30px;
  }
}

.blog-post-entry.hidden {
  display: none !important;
}

/* Projects page */
.projects-title {
  text-align: center;
  margin-bottom: 40px;
}

.projects-categories {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.projects-categories-dropdown {
  display: inline-block;
  position: relative;
}

.projects-categories-toggle {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 40px 8px 0;
  position: relative;
}

.projects-categories-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.projects-categories-dropdown.open .projects-categories-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.projects-categories-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: rgba(27, 29, 37, 0.95);
  border-radius: 4px;
  list-style: none;
  padding: 8px 0;
  margin: 8px 0 0 0;
  min-width: 200px;
  max-height: 360px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.projects-categories-dropdown.open .projects-categories-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.projects-categories-item {
  margin: 0;
  padding: 0;
}

/*.projects-categories-item + .projects-categories-item {
  margin-top: 8px;
}*/

.projects-categories-link {
  display: block;
/*  padding: 12px 24px;*/
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.projects-categories-item.active .projects-categories-link {
  color: var(--text-link);
  font-weight: 500;
}

.projects-categories-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0;
  margin: 40px 0;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
}

@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
}

.project-card {
  position: relative;
  width: 100%;
  display: block;
  /*border-radius: 5px;*/
  overflow: hidden;
}

.project-card-link {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 60%;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.project-card__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: center center/cover no-repeat;
  background-color: var(--bg-secondary);
  filter: grayscale(1);
  transition: filter 0.2s ease-out;
  z-index: 0;
}

.project-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #595c85;
  opacity: 0.7;
  z-index: 1;
  transition: opacity 0.4s ease-out;
}

.project-card__description {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 3;
  padding: 20px;
  transition: opacity 0.2s ease-out;
}

.project-card__platforms {
  display: block;
  font-size: 0.85rem;
  color: #e1acb9;
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  .project-card__platforms {
    margin-bottom: 15px;
  }
}

.project-card__title {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  z-index: 1;
}

@media (min-width: 768px) {
  .project-card__title {
    font-size: 1.5rem;
  }
}

.project-card__more {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease-out;
  z-index: 2;
  opacity: 0;
  white-space: nowrap;
}

.project-card__button {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card-link:hover .project-card__overlay {
  opacity: 0;
}

.project-card-link:hover .project-card__background {
  filter: grayscale(0);
}

.project-card-link:hover .project-card__description {
  opacity: 0;
}

.project-card-link:hover .project-card__more {
  opacity: 1;
}

.projects-load-more {
  text-align: center;
  margin: 60px 0 0;
  padding-bottom: 40px;
}

.projects-load-more-btn {
  position: relative;
  display: inline-block;
  padding: 15px 20px;
  background-color: #595c85;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  outline: none;
  margin: 0;
  vertical-align: middle;
  overflow: hidden;
  z-index: 1;
  transition: color 0.18s ease-out, background 0.2s ease-out;
}

.projects-load-more-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #2f2a8a;
  background: linear-gradient(to right, #2f2a8a 0%, #1398ff 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2f2a8a', endColorstr='#1398ff', GradientType=1);
  transition: opacity 0.2s ease-out;
  opacity: 0;
  z-index: -1;
}

.projects-load-more-btn:hover,
.projects-load-more-btn:active {
  color: #fff;
  text-decoration: none;
}

.projects-load-more-btn:hover::after,
.projects-load-more-btn:active::after {
  opacity: 1;
}

/* Hidden projects for load more */
.project-card.hidden {
  display: none;
}

/* Project single page */
.project-back {
  margin-bottom: 24px;
}

.project-back-link {
  color: var(--text-link);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.project-back-link:hover {
  color: var(--accent);
}

.project-title {
  font-family: "campaign_groteskmedium", sans-serif;
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--text-primary);
  margin: 0 0 60px 0;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .project-title {
    font-size: 3rem;
    margin-bottom: 80px;
  }
}

.project-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 60px;
}

@media (min-width: 768px) {
  .project-content-wrapper {
    flex-direction: row;
    gap: 32px;
  }
}

.project-content-main {
  flex: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .project-content-main {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    padding-right: 24px;
  }
}

@media (min-width: 1200px) {
  .project-content-main {
    padding-right: 48px;
  }
}

.project-content {
  color: var(--text-primary);
  line-height: 1.8;
  text-align: left;
}

.project-content p {
  margin-bottom: 1.5em;
}

.project-content h2,
.project-content h3,
.project-content h4 {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  margin-top: 2em;
  margin-bottom: 1em;
  color: var(--text-primary);
}

.project-content h2 {
  font-size: 1.75rem;
}

.project-content h3 {
  font-size: 1.5rem;
}

.project-content h4 {
  font-size: 1.25rem;
}

.project-content ul,
.project-content ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.project-content li {
  margin-bottom: 0.5em;
}

.project-content strong,
.project-content b {
  font-family: "campaign_groteskbold", sans-serif;
  font-weight: normal;
  color: #a4a8f2;
}

.project-image-wrapper {
  margin: 40px 0;
  text-align: center;
}

.project-image {
  max-width: 100%;
  height: auto;
  /*border-radius: 5px;*/
}

.project-highlighted {
  position: relative;
  display: inline-block;
  width: 100%;
}

.project-highlighted img {
  margin: 0;
  display: block;
  width: 100%;
  height: auto;
}

.project-highlighted__image {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: center center/cover no-repeat;
  z-index: 1;
}

.project-screenshot {
  margin: 40px 0;
}

.project-screenshot img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  display: block;
}

.project-sidebar {
  flex: 0 0 100%;
}

@media (min-width: 768px) {
  .project-sidebar {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }
}

.project-meta {
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 5px;
}

.project-meta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.project-meta-item {
  margin-bottom: 24px;
}

.project-meta-item:last-child {
  margin-bottom: 0;
}

.project-meta-label {
  font-size: 0.75rem;
  color: var(--text-link);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.project-meta-item span {
  color: var(--text-primary);
  font-size: 0.9375rem;
  display: block;
}

.project-meta-item a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-meta-item a:hover {
  color: var(--text-link);
}

.project-website-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.project-website-btn:hover {
  background: var(--text-link);
  color: var(--bg-primary);
}

/* Project navigation */
.project-nav-link {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 500px;
  height: 150px;
  text-decoration: none;
  color: inherit;
  background: center center/cover no-repeat;
  border-radius: 5px;
  overflow: hidden;
  transition: opacity 0.18s ease-out, background-color 0.18s ease-out;
  z-index: 2;
}

.project-nav-link--prev {
  background-position: left center;
}

.project-nav-link--next {
  background-position: right center;
}

.project-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--bg-secondary);
  opacity: 0.8;
  z-index: 0;
  transition: opacity 0.18s ease-out, background-color 0.18s ease-out;
}

.project-nav-link:hover::before {
  background-color: rgba(27, 29, 37, 0.4);
  opacity: 0.4;
}

.project-nav-link--empty {
  pointer-events: none;
  opacity: 0;
}

.project-nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1;
}

.project-nav-link--prev::after {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(28, 31, 40, 0.8) 84%,
    rgba(27, 29, 37, 1) 100%
  );
}

.project-nav-link--next::after {
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(28, 31, 40, 0.8) 84%,
    rgba(27, 29, 37, 1) 100%
  );
  right: auto;
  left: 0;
}

.project-nav-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.project-nav-label {
  display: block;
  font-size: 0.75rem;
  color: #e1acb9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.project-nav-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .project-nav-title {
    font-size: 1.25rem;
  }
}

/* Blog post single page */
.blog-post-back {
  margin-bottom: 24px;
}

.blog-post-back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.blog-post-back-link:hover {
  color: var(--accent);
}

.blog-post-title {
  font-family: "campaign_groteskmedium", sans-serif;
  font-size: 2rem;
  font-weight: normal;
  color: var(--text-primary);
  margin: 0 0 40px 0;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .blog-post-title {
    font-size: 2.5rem;
    margin-bottom: 48px;
  }
}

@media (min-width: 1200px) {
  .blog-post-title {
    font-size: 3rem;
    margin-bottom: 60px;
  }
}

.blog-post-featured-image {
  width: 100%;
  margin-bottom: 40px;
  border-radius: 5px;
  overflow: hidden;
}

.blog-post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-post-body {
  margin-bottom: 60px;
  line-height: 1.8;
  color: var(--text-primary);
}

.blog-post-body p {
  margin-bottom: 1.5em;
}

.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4 {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  margin-top: 2em;
  margin-bottom: 1em;
  color: var(--text-primary);
}

.blog-post-body h2 {
  font-size: 1.75rem;
}

.blog-post-body h3 {
  font-size: 1.5rem;
}

.blog-post-body h4 {
  font-size: 1.25rem;
}

.blog-post-body ul,
.blog-post-body ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.blog-post-body li {
  margin-bottom: 0.5em;
}

.blog-post-body a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.blog-post-body a:hover {
  color: var(--text-link);
}

.blog-post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 2em 0;
}

.blog-post-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post-meta-item {
  display: flex;
  gap: 8px;
  font-size: 0.9375rem;
}

.blog-post-meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.blog-post-meta-value {
  color: var(--text-secondary);
}

.blog-post-meta time {
  color: var(--text-secondary);
}

/* Blog post navigation */
.blog-post-nav-link {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 500px;
  height: 150px;
  text-decoration: none;
  color: inherit;
  background: center center/cover no-repeat;
  border-radius: 5px;
  overflow: hidden;
  transition: opacity 0.18s ease-out, background-color 0.18s ease-out;
  z-index: 2;
}

.blog-post-nav-link:hover::before {
  background-color: rgba(27, 29, 37, 0.4);
  opacity: 0.4;
}

.blog-post-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--bg-secondary);
  opacity: 0.8;
  z-index: -2;
  transition: opacity 0.18s ease-out, background-color 0.18s ease-out;
}

.blog-post-nav-link--empty {
  pointer-events: none;
  opacity: 0;
}

.blog-post-nav-image {
  display: none;
}

.blog-post-nav-link--prev {
  background-position: left center;
}

.blog-post-nav-link--next {
  background-position: right center;
}

.blog-post-nav-link::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: -1;
}

.blog-post-nav-link--prev::after {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(28, 31, 40, 0.8) 84%,
    rgba(27, 29, 37, 1) 100%
  );
}

.blog-post-nav-link--next::after {
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(28, 31, 40, 0.8) 84%,
    rgba(27, 29, 37, 1) 100%
  );
  right: auto;
  left: 0;
}

.blog-post-nav-content {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  z-index: 1;
  padding: 0 20px;
}

.blog-post-nav-label {
  display: block;
  font-size: 0.75rem;
  color: #e1acb9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-post-nav-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .blog-post-nav-title {
    font-size: 1.25rem;
  }
}

/* ===== Bootstrap-like utility classes for project pages ===== */
.mb-6 { margin-bottom: 40px !important; }
.mb-8 { margin-bottom: 60px !important; }
.mb-md-8 { margin-bottom: 60px !important; }
@media (min-width: 768px) {
  .mb-md-8 { margin-bottom: 80px !important; }
}

.pb-5 { padding-bottom: 3rem; }
.pb-6 { padding-bottom: 3.5rem; }
.pb-lg-8 { padding-bottom: 4rem; }
@media (min-width: 1200px) {
  .pb-lg-8 { padding-bottom: 5rem; }
}

.o-inner-container {
  width: 100%;
  position: relative;
  display: block;
}

.o-inner-container--large {
  max-width: 1080px !important;
}

.o-inner-container--medium-large {
  max-width: 680px !important;
}

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.ml-auto {
  margin-left: auto !important;
}

.mr-auto {
  margin-right: auto !important;
}

.u-fs-small {
  font-size: 0.875rem;
  line-height: 1.38;
}

.u-fs-medium {
  font-size: 1rem;
  line-height: 1.4;
}

.u-fs-tiny {
  font-size: 0.75rem;
}

.u-fs-large {
  font-size: 25px;
  line-height: 1.42;
}

@media (min-width: 768px) {
  .u-fs-small {
    font-size: 1rem;
    line-height: 1.5;
  }

  .u-fs-medium {
    font-size: 1.125rem;
  }

  .u-fs-large {
    font-size: 35px;
  }
}

.u-fs-huge {
  font-family: "campaign_groteskmedium", sans-serif;
  font-size: 3rem;
  font-weight: normal;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .u-fs-huge {
    font-size: 3rem;
  }
}

.u-fs-medium-large {
  font-size: 1rem;
  line-height: 1.38;
}

@media (min-width: 576px) {
  .u-fs-medium-large {
    font-size: 1.25rem;
  }
}

@media (min-width: 768px) {
  .u-fs-medium-large {
    font-size: 1.5rem;
  }
}

.u-fs-zero {
  font-size: 0;
}

.u-ft-regular {
  font-family: "campaign_groteskregular", sans-serif;
  font-weight: normal;
}

.u-ft-medium {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
}

.text-primary-dark {
  color: #595c85 !important;
}

.text-secondary {
  color: #e1acb9 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-primary {
  color: #a4a8f2 !important;
}

.text-white {
  color: #ffffff !important;
}

.d-inline-block {
  display: inline-block;
}

.mw-100 {
  max-width: 100% !important;
  height: auto !important;
}

.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

/* Responsive display utilities */
@media (min-width: 768px) {
  .d-md-block {
    display: block !important;
  }
  .d-md-none {
    display: none !important;
  }
}

.bg-primary-dark-2 {
  background: #383b55;
}

.p-5 {
  padding: 3rem;
}

.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-unstyled-item {
  margin-bottom: 1.5rem;
}

.list-unstyled-item:last-child {
  margin-bottom: 0;
}

.c-button {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.c-button:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.c-wp {
  color: var(--text-primary);
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.c-wp img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.c-wp p,
.c-wp ul,
.c-wp ol {
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .c-wp p,
  .c-wp ul,
  .c-wp ol {
    margin-bottom: 27px;
  }
}

.c-wp h1,
.c-wp h2,
.c-wp h3,
.c-wp h4,
.c-wp h5,
.c-wp h6 {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 25px;
}

.c-wp h2 {
  margin-top: 25px;
}

@media (min-width: 768px) {
  .c-wp h1,
  .c-wp h2,
  .c-wp h3,
  .c-wp h4,
  .c-wp h5,
  .c-wp h6 {
    margin-bottom: 30px;
  }
}

.c-wp strong,
.c-wp b {
  font-family: "campaign_groteskbold", sans-serif;
  font-weight: normal;
  color: #a4a8f2;
}

.c-wp em {
  font-style: italic;
}

.c-wp ul,
.c-wp ol {
  padding-left: 2em;
}

.c-wp li {
  margin-bottom: 10px;
}

.c-wp2 {
  color: var(--text-primary);
  text-align: center;
}

.c-wp2 p,
.c-wp2 ul,
.c-wp2 ol {
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .c-wp2 p,
  .c-wp2 ul,
  .c-wp2 ol {
    margin-bottom: 27px;
  }
}

.c-wp2 h1,
.c-wp2 h2,
.c-wp2 h3,
.c-wp2 h4,
.c-wp2 h5,
.c-wp2 h6 {
  font-family: "campaign_groteskmedium", sans-serif;
  font-weight: normal;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 25px;
}

@media (min-width: 768px) {
  .c-wp2 h1,
  .c-wp2 h2,
  .c-wp2 h3,
  .c-wp2 h4,
  .c-wp2 h5,
  .c-wp2 h6 {
    margin-bottom: 30px;
  }
}

.c-wp2 strong,
.c-wp2 b {
  font-family: "campaign_groteskbold", sans-serif;
  font-weight: normal;
  color: #a4a8f2;
}

.c-wp2 em {
  font-style: italic;
}

.c-wp2 ul,
.c-wp2 ol {
  padding-left: 2em;
}

.c-wp2 li {
  margin-bottom: 10px;
}

/* Bootstrap-like grid system */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

.col-md-8,
.col-lg-9,
.col-md-4,
.col-lg-3,
.col-sm-6 {
  position: relative;
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

@media (min-width: 576px) {
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

.pt-8 .row,
.pt-md-9 .row {
  justify-content: space-between;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.pt-8 .row .col-sm-6,
.pt-md-9 .row .col-sm-6 {
  padding-left: 0;
  padding-right: 0;
}

@media (min-width: 576px) {
  .col-sm-6.text-right {
    margin-left: auto;
  }
}

@media (min-width: 768px) {
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .pr-md-4 {
    padding-right: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  
  .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }

  .pr-lg-6 {
    padding-right: 3.5rem;
  }
}

@media (min-width: 768px) {
  .mb-md-0 {
    margin-bottom: 0;
  }
  
  .mb-md-8 {
    margin-bottom: 5rem;
  }
  
  .text-md-left {
    text-align: left;
  }
  
  .col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  
  .align-items-center {
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .mb-lg-8 {
    margin-bottom: 5rem;
  }
  
  .mb-lg-10 {
    margin-bottom: 0;
  }
  
  .pt-lg-6 {
    padding-top: 3.5rem;
  }
  
  .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  
  .mb-lg-7 {
    margin-bottom: 4rem;
  }
}

.mb-5 { margin-bottom: 3rem; }
.mb-6 { margin-bottom: 0px !important; }
.mb-7 { margin-bottom: 4rem; }
.mb-8 { margin-bottom: 60px !important; }
.mb-9 { margin-bottom: 0; }
.mb-10 { margin-bottom: 6rem; }

/* ===== Homepage Header Styles ===== */

/* Desktop homepage header */
body.homepage .site-header {
  position: relative;
  padding-top: 40px;
  padding-bottom: 24px;
  z-index: 2;
}

body.homepage .site-header::after {
  display: block;
}

/* Ensure header-inner is above background */
body.homepage .header-inner {
  position: relative;
  z-index: 10 !important;
}

body.homepage .logo {
  position: relative;
  z-index: 11 !important;
}

/* Desktop homepage nav styles removed - using unified .desktop-nav styles */

.c-home-header-container {
  position: relative;
  width: 100%;
  margin-top: 0;
  padding-top: 80px;
}

/* Background image for homepage header - using ::before pseudo-element */
body.homepage .site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  width: 100%;
  background-image: url('../img/home-header-bg.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* ===== Homepage Mobile Styles ===== */
@media (max-width: 767px) {
  /* Reset container margins */
  .c-home-header-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Header padding and position */
  body.homepage .site-header {
    padding-top: 22px !important;
    padding-bottom: 0 !important;
    min-height: auto !important;
    background: transparent !important;
  }

  body.homepage .site-header::after {
    display: none !important;
  }

  /* Header inner - flex container centered */
  body.homepage .site-header .header-inner {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    padding: 0 16px !important;
    z-index: 10 !important;
  }

  /* Logo centered in flex with top margin */
  body.homepage .logo {
    display: block !important;
    position: relative !important;
    margin-top: 20px !important;
  }

  /* Hamburger positioned absolutely on right */
  body.homepage .hamburger-toggle {
    position: absolute !important;
    right: 16px !important;
    top: 22px !important;
    z-index: 1001 !important;
  }

  /* Mobile fullscreen menu for homepage */
  body.homepage .main-nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: linear-gradient(to bottom, #25283b 0%, #1b1d25 100%) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 100px 40px 40px !important;
  }

  body.homepage .main-nav.open {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
  }

  body.homepage .main-nav ul {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  body.homepage .main-nav li {
    text-align: center !important;
  }

  body.homepage .main-nav a {
    text-align: center !important;
    pointer-events: auto !important;
  }

  body.homepage .logo img {
    width: auto !important;
    height: 149px !important;
    transform: none !important;
  }

  /* Background - limited height for mobile */
  body.homepage .site-header::before {
    height: 360px !important;
    background-position: right top !important;
  }

  /* Hero text wrapper */
  .c-home-header-wrapper {
    position: relative !important;
    z-index: 1 !important;
  }

  .c-home-header-wrapper .text-center {
    text-align: center !important;
  }

  .c-home-header-wrapper h1 {
    font-size: 30px !important;
    color: #ffffff !important;
  }

  .c-home-header-wrapper p {
    color: #ffffff !important;
  }

  /* Subtitle - no underline on mobile */
  .mobile-subtitle-underline {
    position: relative !important;
    display: inline-block !important;
    padding-bottom: 0 !important;
  }

  .mobile-subtitle-underline .underline-comet {
    display: none !important;
  }

  /* Who we are section */
  .c-home-header-section .row {
    flex-direction: column !important;
  }

  .c-home-header-section .col-md-7,
  .c-home-header-section .col-md-5 {
    width: 100% !important;
    margin-bottom: 32px !important;
    text-align: center !important;
  }

  .c-home-header-section .text-md-left {
    text-align: center !important;
  }

  .c-home-header-section .col-md-7 {
    order: 2 !important;
  }

  .c-home-header-section .col-md-5 {
    order: 1 !important;
  }

  .u-fs-large {
    font-size: 1.75rem !important;
  }

  .c-wp {
    padding: 0 16px !important;
    text-align: left !important;
  }

  /* Выравнивание текста по левому краю для статей */
  .content,
  .post-body,
  .project-content,
  .c-article__content {
    text-align: left !important;
  }
}

@media (max-width: 575px) {
  body.homepage .logo img {
    width: auto !important;
    height: 149px !important;
  }

  .u-fs-large {
    font-size: 1.5rem !important;
  }

  .c-home-header-section .col-md-7,
  .c-home-header-section .col-md-5 {
    margin-bottom: 24px !important;
  }
}

/* Hide underline comet on desktop */
@media (min-width: 768px) {
  .mobile-subtitle-underline .underline-comet {
    display: none !important;
  }
}

body.homepage .c-home-header-section {
  position: relative;
  z-index: 1;
}

.c-home-header-wrapper {
  position: relative;
  width: 100%;
  z-index: 1;
}

.c-home-header-wrapper > .container {
  position: relative;
  z-index: 1;
}

.c-separator {
  width: 100%;
  max-width: 140px;
  height: 3px;
  background: linear-gradient(to right, rgba(61, 65, 103, 0.2) 0%, rgba(59, 69, 111, 0.2) 5%, #1398ff 100%);
  border-radius: 9px;
}

.c-separator--small {
  max-width: 400px;
}

.services-grid-home {
  margin: 60px auto;
  max-width: 1200px;
}

.services-grid-home .services-grid,
.services-grid-home .grid-responsive {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 40px 20px !important;
  max-width: 100% !important;
  margin: 0 !important;
  align-items: start !important;
}

.services-grid-home .services-grid .service-item:last-child,
.services-grid-home .grid-responsive .service-item:last-child {
  grid-column: auto !important;
}

/* Services Grid Mobile Responsive */
@media (max-width: 767px) {
  .services-grid-home .services-grid,
  .services-grid-home .grid-responsive {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px 20px !important;
  }

  .services-grid-home .service-item__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
  }

  .services-grid-home .service-item__icon img {
    width: 120px;
    height: 120px;
  }

  .services-grid-home .service-item h3 {
    font-size: 14px;
  }
}

@media (max-width: 575px) {
  .services-grid-home .services-grid,
  .services-grid-home .grid-responsive {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 12px !important;
    padding: 0 12px;
  }

  .services-grid-home .service-item__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
  }

  .services-grid-home .service-item__icon img {
    width: 90px;
    height: 90px;
  }

  .services-grid-home .service-item h3 {
    font-size: 12px;
    line-height: 1.3;
  }
}

.projects-grid-home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 576px) {
  .projects-grid-home {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .projects-grid-home {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Projects Grid Mobile Enhancements */
@media (max-width: 575px) {
  .project-card__description {
    padding: 16px;
  }

  .project-card-title {
    font-size: 1.125rem;
  }

  .project-card__background {
    background-size: cover;
  }
}

.c-services-home {
  position: relative;
}

.c-projects-home {
  position: relative;
  margin-bottom: 20px;
}

.c-testimonials-wrapper {
  position: relative;
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
}

/* Мобильная навигация скрыта на десктопе */
.c-testimonials-mobile-nav {
  display: none;
}

.c-testimonials-container {
  position: relative;
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  overflow: hidden;
}

.c-testimonials-track {
  width: 100%;
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.c-testimonials-track .c-testimonial {
  flex-shrink: 0;
  width: 100%;
}


.c-testimonial__content {
  margin-bottom: 40px;
}

.c-testimonial__company {
  padding-top: 40px;
}

.c-testimonials-controls {
  position: relative;
  width: 100%;
  max-width: 550px;
  margin: 40px auto;
}

@media (max-width: 991.98px) {
  .c-testimonials-controls {
    position: relative;
    margin: 20px auto;
  }
}

.c-testimonials-controls__button {
  position: absolute;
  top: 10%;
  width: 40px;
  height: 40px;
  z-index: 2;
  cursor: pointer;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.c-testimonials-controls__button--prev {
  left: 0;
  background: url("/img/carousel-button-left.svg") center center no-repeat;
}

.c-testimonials-controls__button--next {
  right: 0;
  background: url("/img/carousel-button-right.svg") center center no-repeat;
}

.c-navigation-carousel-container {
  position: relative;
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
  overflow: hidden;
}

.c-navigation-carousel-track {
  display: flex;
  transition: transform 0.7s ease;
  will-change: transform;
}

.c-navigation-carousel__slide {
  flex: 0 0 auto;
  text-align: center;
  padding: 0 10px;
  box-sizing: border-box;
  opacity: 0.5;
  transition: opacity 0.2s ease-out;
  cursor: pointer;
  min-width: 0;
}

.c-navigation-carousel__slide.active {
  opacity: 1;
}

.c-navigation-carousel__slide.active .c-navigation-carousel__icon img {
  filter: brightness(0) invert(1);
  transition: filter 0.4s ease-out;
}

.c-navigation-carousel__slide:hover {
  opacity: 0.8;
}

@media (min-width: 768px) {
  .c-navigation-carousel__slide {
    flex: 0 0 calc(33.333% - 20px);
    width: calc(33.333% - 20px);
  }
}

@media (max-width: 719.98px) {
  .c-navigation-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
  }
}

.c-navigation-carousel__icon {
  position: relative;
  height: 120px;
  width: 100%;
  margin-bottom: 0px;
}

.c-navigation-carousel__icon img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 44px;
  max-width: 100px;
  object-fit: contain;
}

.c-navigation-carousel__details {
  color: #e1acb9;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.c-navigation-carousel__slide.active .c-navigation-carousel__details {
  opacity: 1;
}

.c-navigation-carousel__details span {
  display: block;
  margin-bottom: 0px;
  font-size: 0.875rem;
}

/* ===== Testimonials Carousel Mobile ===== */

@media (max-width: 767px) {
  /* Testimonials heading size */
  .container .u-fs-huge {
    font-size: 30px;
  }

  .c-testimonials-wrapper {
    padding: 0 16px;
    max-width: 100%;
    position: relative;
  }

  /* Узкий бокс для комментариев */
  .c-testimonials-container {
    max-width: 280px;
    margin: 0 auto;
    padding: 0;
    min-height: auto;
    overflow: hidden;
    position: relative;
  }

  .c-testimonials-track {
    display: flex !important;
    width: 100%;
  }

  .c-testimonials-track .c-testimonial {
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .c-testimonial__content {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
    padding: 0;
    text-align: center;
  }

  .c-testimonials-controls {
    display: none;
  }

  /* Скрыть десктопные кнопки на мобильных */
  .c-testimonials-wrapper > .c-testimonials-controls__button {
    display: none;
  }

  /* Навигация под комментариями: кнопки + логотип между ними */
  .c-testimonials-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 30px;
  }

  .c-testimonials-mobile-nav .c-testimonials-controls__button {
    position: static;
    transform: none;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: block;
  }

  /* Логотип компании между кнопками */
  .c-mobile-company {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 100px;
  }

  .c-mobile-company__logo {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .c-mobile-company__logo img {
    max-height: 32px;
    max-width: 90px;
    opacity: 0.8;
  }

  .c-mobile-company__name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
  }

  .c-mobile-company__author {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
  }

  /* Скрыть навигационную карусель компаний на мобильных */
  .c-navigation-carousel-container {
    display: none;
  }

  /* Скрыть точки-индикаторы */
  .c-testimonials-dots {
    display: none;
  }
}

@media (max-width: 575px) {
  .c-testimonials-container {
    max-width: 260px;
  }

  .c-testimonial__content {
    font-size: 13px;
  }

  .c-testimonials-mobile-nav {
    gap: 16px;
  }

  .c-testimonials-mobile-nav .c-testimonials-controls__button {
    width: 32px;
    height: 32px;
  }

  .c-mobile-company__logo img {
    max-height: 28px;
    max-width: 80px;
  }
}

/* ===== Mobile Testimonials Carousel (New) ===== */
.d-block.d-md-none h2.u-fs-huge {
  font-size: 30px !important;
}

.c-testimonials-mobile {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  box-sizing: border-box;
}

.c-testimonials-mobile__container {
  position: relative;
  overflow: hidden;
}

.c-testimonials-mobile__track {
  display: flex;
  transition: transform 0.5s ease;
}

.c-testimonials-mobile__slide {
  flex-shrink: 0;
  box-sizing: border-box;
}

.c-testimonials-mobile__content {
  font-size: 14px;
  line-height: 1.6;
  color: #a4a8f2;
  text-align: center;
}

.c-testimonials-mobile__nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.c-testimonials-mobile__btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border: none !important;
  background-color: transparent !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  background-size: 40px 40px !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.c-testimonials-mobile__btn--prev {
  background-image: url("/img/carousel-button-left.svg") !important;
}

.c-testimonials-mobile__btn--next {
  background-image: url("/img/carousel-button-right.svg") !important;
}

.c-testimonials-mobile__btn svg {
  display: none;
}

.c-testimonials-mobile__company {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.c-testimonials-mobile__logo {
  display: block !important;
  height: 66px !important;
  width: auto !important;
  max-width: 150px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
}

.c-testimonials-mobile__company-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.c-testimonials-mobile__company-name {
  font-size: 14px;
  color: #e1acb9;
  text-align: left;
}

.c-testimonials-mobile__company-author {
  font-size: 12px;
  color: #e1acb9;
  text-align: left;
}

.c-partners {
  font-size: 0;
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0 -20px;
}

.c-partners li {
  position: relative;
  display: inline-block;
  margin: 20px;
}

.c-partners img {
  max-width: 90px;
  max-height: 40px;
}

@media (min-width: 768px) {
  .c-partners img {
    max-width: 125px;
    max-height: 56px;
  }
}

/* ===== Clients & Partners Mobile ===== */

@media (max-width: 767px) {
  .u-fs-huge {
    font-size: 2rem;
  }

  .c-partners {
    margin: 0 -12px;
    padding: 0 16px;
  }

  .c-partners li {
    margin: 12px 8px;
  }

  .c-partners img {
    max-width: 70px;
    max-height: 32px;
  }
}

@media (max-width: 575px) {
  .u-fs-huge {
    font-size: 1.75rem;
  }

  .c-partners {
    margin: 0 -8px;
  }

  .c-partners li {
    margin: 8px 6px;
  }

  .c-partners img {
    max-width: 60px;
    max-height: 28px;
  }
}

.link-underline-onload {
  position: relative;
  display: inline-block; /* ВАЖНО — ограничивает ширину текстом */
}

.link-underline-onload::before {
  content: "";
  position: absolute;
  bottom: -6px; 
  left: 0;
  height: 2px;
  width: 0; /* Начинаем с нуля */
  background: linear-gradient(
    to right,
    rgba(61, 65, 103, 0.2) 0%,
    rgba(59, 69, 111, 0.2) 5%,
    #1398ff 100%
  );
  animation: underline-slide 0.6s ease-out forwards;
}

/* Анимация до полной ширины текста */
@keyframes underline-slide {
  from { width: 0; }
  to { width: 100%; }
}



/* ===== Bootstrap-like grid utilities for about page ===== */
.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
  padding-left: 10px;
  padding-right: 10px;
}

.col-sm-4 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

@media (min-width: 992px) {
  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

.col-md-12 {
  flex: 0 0 100%;
  max-width: 100%;
  padding-left: 10px;
  padding-right: 10px;
}

.justify-content-center {
  justify-content: center;
}

@media (min-width: 768px) {
  .mx-md-n8 {
    margin-left: -60px !important;
    margin-right: -60px !important;
  }
  
  .px-md-8 {
    padding-left: 60px !important;
    padding-right: 60px !important;
  }
}

.mb-8 {
  margin-bottom: 60px;
}

.mb-md-9 {
  margin-bottom: 60px;
}

.mx-xl-n4 {
  margin-left: -20px !important;
  margin-right: -20px !important;
}

.px-xl-4 {
  padding-left: 20px !important;
  padding-right: 20px !important;
}

@media (min-width: 768px) {
  .mb-md-9 {
    margin-bottom: 80px;
  }
}

.mb-md-8 {
  margin-bottom: 60px;
}

@media (min-width: 768px) {
  .mb-md-8 {
    margin-bottom: 80px;
  }
}

.mb-lg-9 {
  margin-bottom: 80px;
}

@media (min-width: 1200px) {
  .mb-lg-9 {
    margin-bottom: 100px;
  }
}

.pt-6 {
  padding-top: 40px !important;
}

.pt-8 {
  padding-top: 60px;
}

@media (min-width: 768px) {
  .pt-md-9 {
    padding-top: 80px;
  }
}


.services-grid-page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px 150px;
  justify-items: center;
  align-items: start;
  max-width: 1100px;
/*  margin: 0 auto 80px;*/
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.services-page .services-grid-page .service-item-page:last-child:nth-child(3n+1) {
  grid-column: 2;
}

.services-grid-page .service-item-page:nth-child(10) {
  grid-column: 2;
}

.service-item-page {
  text-align: center;
  transition: color 0.2s ease, transform 0.2s ease;
}


.service-item-page__icon img {
  width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 25px;
}

.service-item-page h3 {
  font-family: "campaign_groteskregular", sans-serif;
  font-weight: 400;           
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
  color: #a4a8f2;            
  transition: color 0.2s ease;
}

/* Hover — как на оригинале */
.service-item-page:hover h3 {
  color: #ffffff;
}

.service-item-page:hover {
  transform: translateY(-4px);
}

/* Mobile: 2 columns for services grids */
@media (max-width: 767px) {
  .services-grid-page {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 20px;
    max-width: 100%;
    padding: 0 16px;
  }

  .services-grid-page .service-item-page:nth-child(10) {
    grid-column: auto;
  }

  .service-item-page__icon img {
    width: 70px;
  }

  .service-item-page h3 {
    font-size: 14px;
  }
}

/* ===== ALTERNATIVE SERVICES GRID (ENGINES / PLATFORMS STYLE) ===== */

/* ОБЁРТКА ОДНОГО ЭЛЕМЕНТА (иконка + текст) */
.service-item-alt {
  text-align: center;
  cursor: default;
  transition: color .25s ease;
  margin-bottom: 80px;   
}

/* ИКОНКА — 280×100px как в задаче */
.service-item-alt__icon img {
  width: 120px;   /* <<< ТВОЙ РАЗМЕР */
  height: 100px;  /* <<< ТВОЙ РАЗМЕР */
  object-fit: contain;
  display: block;
  /*margin: 0 auto 0px auto;  */
  transition: transform .25s ease;
}

.service-item-alt:hover img {
  transform: translateY(-4px);
}

/* ТЕКСТ */
.service-item-alt h3 {
  font-family: campaign_groteskregular, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.35;
  color: #A4A8F2;
  margin: 0;
  width: 258px;
  margin-left: -65px;
  margin-right: auto;
  transition: color .25s ease;
}

/* ХОВЕР ПО ТЕКСТУ */
.service-item-alt:hover h3 {
  color: #FFF;
}

/* СЕТКА 3×2 */
.services-grid-alt-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 250px;
  width: 100%;
  margin-left: -115px;
  margin-right: 0;
  justify-content: start;
}

/* СЕТКА НИЖНЯЯ (2 элемента) */
.services-grid-alt-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 250px;
  justify-items: center;
  max-width: 60%;
  margin-left: 115px;
}

/* Mobile: 2 columns for engines/platforms grids */
@media (max-width: 767px) {
  .services-grid-alt-top {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 30px;
    margin-left: 0;
    padding: 0 16px;
  }

  .services-grid-alt-bottom {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 30px;
    max-width: 100%;
    margin-left: 0;
    padding: 0 16px;
  }

  .service-item-alt {
    margin-bottom: 20px;
  }

  .service-item-alt__icon img {
    width: 80px;
    height: 70px;
    margin: 0 auto;
  }

  .service-item-alt h3 {
    font-size: 14px;
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }

  /* Центрировать последний нечётный элемент в сетке 2 колонки */
  .services-grid-alt-top .service-item-alt:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .services-grid-alt-bottom .service-item-alt:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

/* Новый underline-эффект */
.c-nav-underline {
  position: relative;
  display: inline-block;
}

.c-nav-underline::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, rgba(61,65,103,0.2) 0%, rgba(59,69,111,0.2) 5%, #1398ff 100%);
  border-radius: 4px;
  transition: width .15s ease-out;
}

/* hover эффект */
.c-nav-underline:hover::before {
  width: 100%;
}

/* активная — черта ВСЕГДА видна */
.c-nav-underline.active::before {
  width: 100%;
}



/* ===== Image crop utilities ===== */
.o-crop__content {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.o-crop__content--center {
  object-position: center;
}

.block1 {
  overflow: hidden;
  width: 100%;
}

.block1 img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery {
  padding: 0;
  list-style-type: none;
  margin: 0 auto 18px;
}

.gallery .gallery-item {
  float: left;
  width: 32%;
  box-sizing: border-box;
  padding: 0px;
}

.gallery-item img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: 0.3s;
  padding: 0;
  box-sizing: border-box;
}

.gallery-item img:hover {
  background: #383B55;
}

.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.lightbox-img {
  max-width: 90%;
  max-height: 90%;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
}

.col-md-8.col-lg-9.pr-md-4.pr-lg-6 {
  padding-right: 36px !important; 
}

em, i {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: normal !important;
}

/* Commented out - conflicts with services-grid-home */
/* @media (max-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 40px;
  }
}

@media (max-width: 480px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
} */

/* ===== Switch 2 Porting — clean version ===== */

/* Основной контейнер страницы */
body:has(.switch2porting-header) .container {
    max-width: 1080px;
    margin: 0 auto 0 auto;
    padding: 40px 40px 0;
}

/* Убираем конфликтующие нижние отступы */
body:has(.switch2porting-header) main,
body:has(.switch2porting-header) .container,
body:has(.switch2porting-header) .post-body {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Заголовок */
.switch2porting-title {
    font-size: 50px;
    color: #ffffff;
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 1rem 0;
}

/* Подзаголовок */
.switch2porting-subtitle {
    font-size: 28px;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 2rem 0;
}

/* Контент */
.switch2porting-content {
    color: #ffffff;
    max-width: 800px;
    margin: 0 auto;
}

.switch2porting-content > *:last-child {
    margin-bottom: 0;
}

/* Выделение */
.switch2porting-content strong {
    color: #a4a8f2;
    font-weight: 600;
}

/* Изображение */
.switch2porting-hero {
    width: 100%;
    margin: 0 0 40px 0;
    text-align: center;
}

.switch2porting-hero img {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Полоса-баг фикс */
body:has(.switch2porting-header) main {
    min-height: auto !important;
    background: linear-gradient(to bottom, #25283b 0%, #1b1d25 100%);
    z-index: auto !important;
}


body:has(.switch2porting-header) .post-body {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

main {
  z-index: auto !important;
}

/* Commented out - conflicts with services-grid-homepage */
/* .grid-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 90px 150px;
}

@media (max-width: 768px) {
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .grid-responsive {
    grid-template-columns: 1fr;
    gap: 30px;
  }
} */

/* ===== Homepage Services Grid - Unique styles with MAXIMUM specificity ===== */
html body div.services-grid-home div.services-grid-homepage {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 40px 20px !important;
  max-width: 100% !important;
  margin: 0 !important;
  align-items: start !important;
}

html body div.services-grid-home div.services-grid-homepage .service-item:last-child {
  grid-column: auto !important;
}

/* Mobile: 2 columns for all devices < 768px */
@media only screen and (max-width: 767px) {
  html body div.services-grid-home div.services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px 20px !important;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item__icon img {
    width: 120px;
    height: 120px;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item h3 {
    font-size: 14px;
  }
}

/* Small phones: 2 columns with tighter spacing */
@media only screen and (max-width: 575px) {
  html body div.services-grid-home div.services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 12px !important;
    padding: 0 12px;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item__icon img {
    width: 90px;
    height: 90px;
  }

  html body div.services-grid-home div.services-grid-homepage .service-item h3 {
    font-size: 12px;
    line-height: 1.3;
  }
}

/* ===== Responsive Utilities ===== */

/* Responsive Margins */
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 2.5rem; }

@media (min-width: 768px) {
  .mb-md-6 { margin-bottom: 2.5rem; }
  .mb-md-7 { margin-bottom: 3rem; }
  .mb-md-8 { margin-bottom: 4rem; }
}

@media (min-width: 992px) {
  .mb-lg-8 { margin-bottom: 4rem; }
  .mb-lg-9 { margin-bottom: 5rem; }
  .mb-lg-10 { margin-bottom: 6rem; }
}

/* Text Alignment */
@media (max-width: 767px) {
  .text-center-mobile {
    text-align: center !important;
  }

  .text-left-mobile {
    text-align: left !important;
  }
}

/* Container Padding */
@media (max-width: 767px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ===== CRITICAL FIX: Services Grid Mobile - FORCE 2 columns ===== */
/* Adding at the very end to override everything */

@media (max-width: 767px) {
  html body div.services-grid-home div.services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px 20px !important;
  }
}

@media (max-width: 575px) {
  html body div.services-grid-home div.services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 12px !important;
    padding: 0 12px !important;
  }
}

/* Force mobile grid even more aggressively */
@media screen and (max-width: 767px) {
  .services-grid-home .services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media screen and (max-width: 575px) {
  .services-grid-home .services-grid-homepage {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ===== Gamepad Tool Page ===== */
.gamepadtool-content {
  font-size: 16px;
  line-height: 1.7;
}

.gamepadtool-content h2 {
  color: #a4a8f2;
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.gamepadtool-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 4px;
}

.gamepadtool-content ul,
.gamepadtool-content ol {
  margin-left: 20px;
  margin-bottom: 20px;
}

.gamepadtool-content li {
  margin-bottom: 8px;
}

.gamepadtool-content a {
  color: #a4a8f2;
  text-decoration: underline;
}

.gamepadtool-content a:hover {
  color: #ffffff;
}

.gamepadtool-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.gamepadtool-content th,
.gamepadtool-content td {
  border: 1px solid #444;
  padding: 10px 15px;
  text-align: left;
}

.gamepadtool-content th {
  background: #2a2d3e;
  color: #a4a8f2;
}

.gamepadtool-content code {
  background: #2a2d3e;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

/* Fix gap between main and footer on gamepadtool page */
body:has(.gamepadtool-content) main {
  min-height: auto !important;
}

/* Tables in switch2porting-content (gamepadtool, etc.) */
.switch2porting-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

.switch2porting-content th,
.switch2porting-content td {
  border: 1px solid #444;
  padding: 12px 15px;
  text-align: left;
}

.switch2porting-content th {
  background: #2a2d3e;
  color: #a4a8f2;
  font-weight: 600;
}

.switch2porting-content tr:nth-child(even) {
  background: rgba(42, 45, 62, 0.3);
}
