:root {
  --cx-blue: #0066cc;
  --cx-blue-dark: #004d99;
  --cx-blue-light: #e8f4fc;
  --cx-accent: #00a86b;
  --aws-orange: #ff9900;
  --text: #1a1a2e;
  --text-muted: #5c6370;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --border: #dde3ea;
  --shadow: 0 4px 24px rgba(0, 51, 102, 0.08);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --page-padding-x: clamp(1rem, 2.5vw, 2.25rem);
  --max-width: min(1680px, calc(100vw - 2 * var(--page-padding-x)));
  --logo-tile-size: 112px;
  --logo-tile-img: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
}

a {
  color: var(--cx-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.5rem 1rem;
  background: var(--cx-blue);
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem var(--page-padding-x);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1rem;
}

@media (min-width: 901px) {
  .header-inner {
    flex-wrap: nowrap;
  }

  .header-inner .main-nav {
    margin-left: auto;
  }
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.logo-img {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(170px, 42vw);
  object-fit: contain;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: 0.65rem;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none !important;
  line-height: 1;
}

.lang-switch__btn:hover {
  border-color: var(--cx-blue);
  color: var(--cx-blue-dark);
}

.lang-switch__btn.is-active {
  background: var(--cx-blue-light);
  border-color: var(--cx-blue);
  color: var(--cx-blue-dark);
}

.lang-switch__btn img {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--cx-blue-light);
  color: var(--cx-blue-dark);
  text-decoration: none;
}

.main-nav .has-sub > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.6;
}

.submenu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  z-index: 50;
}

.main-nav li.has-sub.sub-open > .submenu {
  display: block !important;
}

@media (min-width: 901px) {
  .main-nav > ul {
    flex-wrap: nowrap;
  }
}

.submenu a {
  font-weight: 400;
  font-size: 0.88rem;
  border-radius: 0;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  background: var(--cx-blue);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
}

.btn-cta:hover {
  background: var(--cx-blue-dark);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #003d73 0%, var(--cx-blue) 45%, #0088cc 100%);
  color: #fff;
  padding: clamp(2.5rem, 5vw, 4rem) var(--page-padding-x) clamp(3rem, 6vw, 5rem);
}

.hero-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-inner > div {
  min-width: 0;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero .lead {
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  opacity: 0.95;
  margin-bottom: 1.75rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary {
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: var(--cx-blue-dark) !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
}

.btn-outline {
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
}

.hero-visual {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 1.5rem;
}

.hero-stats span {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Sections */
.section {
  padding: clamp(2.75rem, 5vw, 4rem) var(--page-padding-x);
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: 1.85rem;
  margin: 0 0 0.75rem;
  color: var(--cx-blue-dark);
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.25rem, 2vw, 1.5rem);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 51, 102, 0.12);
}

.card.featured {
  border-color: var(--cx-blue);
  border-width: 2px;
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--cx-blue-dark);
}

.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--aws-orange);
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Page hero */
.page-hero {
  background: var(--bg-alt);
  padding: 2.5rem var(--page-padding-x);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 2rem;
  color: var(--cx-blue-dark);
}

.page-hero-media {
  width: 100%;
  max-width: var(--max-width);
  margin: -0.5rem auto 0;
  padding: 0 var(--page-padding-x) 1.5rem;
}

.page-hero-media img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.content-figure {
  margin: 2rem 0;
  text-align: center;
}

.content-figure img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-thumb {
  width: calc(100% + 3.5rem);
  max-width: none;
  margin: -1.75rem -1.75rem 1rem;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
}

.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  background: rgba(0, 40, 80, 0.35);
}

.hero-slideshow .hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: hero-slide-fade 20s infinite;
  animation-timing-function: ease-in-out;
}

.hero-slideshow .hero-slide:nth-child(1) {
  animation-delay: 0s;
}

.hero-slideshow .hero-slide:nth-child(2) {
  animation-delay: 5s;
}

.hero-slideshow .hero-slide:nth-child(3) {
  animation-delay: 10s;
}

.hero-slideshow .hero-slide:nth-child(4) {
  animation-delay: 15s;
}

@keyframes hero-slide-fade {
  0% {
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  21% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slideshow .hero-slide {
    animation: none;
    opacity: 0;
  }

  .hero-slideshow .hero-slide:first-child {
    opacity: 1;
  }
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.content-prose {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--page-padding-x) 4rem;
}

.content-prose h2 {
  color: var(--cx-blue-dark);
  margin-top: 2rem;
}

.content-prose ul {
  padding-left: 1.25rem;
}

.content-prose li {
  margin-bottom: 0.5rem;
}

.solution-figure {
  margin: 1.75rem auto 2rem;
  max-width: 920px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  box-shadow: var(--shadow);
}

.solution-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  vertical-align: middle;
}

.solution-figure figcaption {
  padding: 0.7rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: #fff;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 0.75rem 0 0.75rem 2rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cx-accent);
  font-weight: bold;
}

/* Partners / certs */
.partners-official {
  padding: 2.25rem clamp(1rem, 2vw, 1.5rem) 2rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.cert-group {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
}

.cert-group + .cert-group {
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.cert-group-label {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #5a6570);
  text-align: center;
}

.cert-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
}

.cert-sublabel {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #5a6570);
  text-align: center;
}

.cert-sublabel--certs {
  margin-top: 0.5rem;
}

.cert-group--aws {
  padding-bottom: 1.25rem;
}

.aws-ecosystem {
  width: 100%;
  max-width: min(100%, 1120px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.aws-brand-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.85rem;
  width: 100%;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.aws-brand-tile {
  width: var(--logo-tile-size);
  height: var(--logo-tile-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}

.aws-brand-tile img {
  display: block;
  width: var(--logo-tile-img);
  height: var(--logo-tile-img);
  object-fit: contain;
  object-position: center;
}

.aws-service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
}

.aws-service {
  width: var(--logo-tile-size);
  min-height: var(--logo-tile-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.4rem 0.45rem;
  text-align: center;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}

.aws-service img {
  display: block;
  width: var(--logo-tile-img);
  height: var(--logo-tile-img);
  object-fit: contain;
  object-position: center;
}

.aws-service span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted, #5a6570);
  line-height: 1.15;
}

.aws-cert-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 520px;
}

.aws-cert-pair .logo-cell {
  width: calc(var(--logo-tile-size) * 2 + 0.85rem);
  max-width: 100%;
  height: auto;
  min-height: calc(var(--logo-tile-size) + 24px);
  padding: 0.75rem 1rem;
}

.aws-cert-pair .cert-cell img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--logo-tile-size) + 8px);
  object-fit: contain;
}

.cert-row--partners {
  max-width: min(100%, 1120px);
}

.cert-row--partners .logo-cell {
  flex: 0 0 var(--logo-tile-size);
  width: var(--logo-tile-size);
  height: var(--logo-tile-size);
  min-width: var(--logo-tile-size);
  max-width: var(--logo-tile-size);
  padding: 0.65rem;
}

.logo-cell {
  height: var(--logo-tile-size);
  width: var(--logo-tile-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: #fafbfc;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-sizing: border-box;
}

.logo-cell img {
  display: block;
  width: var(--logo-tile-img);
  height: var(--logo-tile-img);
  object-fit: contain;
  object-position: center;
}

.logo-cell.cert-cell {
  height: auto;
  min-height: var(--logo-tile-size);
  width: var(--logo-tile-size);
}

.logo-cell.cert-cell img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--logo-tile-size) - 8px);
}

/* Legacy grids (if used elsewhere) */
.logo-grid {
  display: grid;
  gap: 1rem 1.25rem;
  justify-items: stretch;
  align-items: stretch;
  width: 100%;
  margin: 0 auto;
}

.logo-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 920px;
}

.logo-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
}

@media (max-width: 720px) {
  .partners-official {
    --logo-tile-size: 100px;
    --logo-tile-img: 64px;
  }

  .aws-cert-pair .logo-cell {
    width: min(100%, calc(var(--logo-tile-size) * 2 + 0.85rem));
  }

  .cert-row--partners .logo-cell {
    flex: 0 0 var(--logo-tile-size);
  }

}

/* Footer */
.site-footer {
  background: #0f2439;
  color: #c5d0dc;
  padding: 3rem var(--page-padding-x) 1.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.footer-contact-list li {
  line-height: 1.45;
}

.footer-contact-k {
  color: #9aa8b8;
  font-weight: 600;
}

.site-footer a {
  color: #a8c4e0;
}

.site-footer a:hover {
  color: #fff;
}

.footer-legal {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #8a9bb0;
}

.contact-box {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  margin-bottom: 1rem;
}

.contact-form button {
  padding: 0.75rem 1.5rem;
  background: var(--cx-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.contact-form button:hover {
  background: var(--cx-blue-dark);
}

@media (max-width: 900px) {
  .hero-inner,
  .two-col {
    grid-template-columns: 1fr;
  }

  .lang-switch {
    order: 3;
    margin-left: auto;
    margin-right: 0.35rem;
  }

  .nav-toggle {
    display: block;
    order: 4;
  }

  .main-nav {
    order: 5;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    box-shadow: var(--shadow);
  }

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

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .submenu {
    position: static;
    display: none !important;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
    margin-top: 0.25rem;
  }

  .main-nav li.has-sub.sub-open > .submenu {
    display: block !important;
  }

  .main-nav li.has-sub > a {
    cursor: pointer;
  }
}
