/* SimplyCodes shell — full-width nav + multi-column footer (ReviewDecode light theme) */

:root {
  --sc-nav-h: 64px;
  --sc-shell-bg: #f4f7fc;
  --sc-shell-surface: rgba(255, 255, 255, 0.92);
  --sc-shell-border: rgba(15, 23, 42, 0.1);
  --sc-shell-text: #0f172a;
  --sc-shell-muted: #64748b;
  --sc-shell-mono: "JetBrains Mono", ui-monospace, monospace;
}

@media (min-width: 1280px) {
  :root { --sc-nav-h: 72px; }
}

.rd-sc-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.rd-sc-shell .siteMain {
  flex: 1 1 auto;
  min-height: 0;
}

.scNav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--sc-nav-h);
  padding: 0 16px;
  border-bottom: 1px solid var(--sc-shell-border);
  background: var(--sc-shell-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 768px) {
  .scNav { padding: 0 32px; }
}

.scNav__container {
  height: 100%;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.scNav__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  gap: 12px;
}

.scNav__left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.scNav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--sc-shell-text);
  margin-right: 24px;
  flex-shrink: 0;
  max-width: min(300px, 52vw);
  line-height: 0;
}

@media (min-width: 1280px) {
  .scNav__logo { margin-right: 40px; max-width: 340px; }
}

.scNav__logoImg,
.scNav__logo img {
  display: block;
  height: 44px;
  width: auto;
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .scNav__logoImg,
  .scNav__logo img {
    height: 48px;
    max-height: 52px;
  }
}

/* Legacy WP custom-logo wrapper if cached markup exists */
.scNav__logo .custom-logo-link {
  display: block;
  line-height: 0;
  max-width: 100%;
}

.scNav__logoPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--brand, #1a73e8);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.scNav__logoMark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.65rem;
  font-weight: 900;
}

.scNav__links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .scNav__links { display: flex; }
}

.scNav__link,
.scNav__dealsBtn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sc-shell-text);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.scNav__link:hover,
.scNav__dealsBtn:hover { color: var(--brand, #1a73e8); }

.scNav__dealsWrap {
  position: relative;
}

.scNav__dealsPanel {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  min-width: 220px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--sc-shell-border);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 60;
}

.scNav__dealsWrap:hover .scNav__dealsPanel,
.scNav__dealsWrap:focus-within .scNav__dealsPanel {
  display: block;
}

.scNav__dealsItem {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--sc-shell-text);
  text-decoration: none;
}

.scNav__dealsItem:hover {
  background: color-mix(in oklab, var(--brand, #1a73e8) 8%, #fff);
  color: var(--brand, #1a73e8);
}

.scNav__dealsEmpty {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  color: var(--sc-shell-muted);
}

.scNav__dealsMore {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand, #1a73e8);
  text-decoration: none;
  border-top: 1px solid var(--sc-shell-border);
  margin-top: 4px;
}

.scNav__right {
  display: none;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .scNav__right { display: flex; }
}

@media (min-width: 1280px) {
  .scNav__right { gap: 16px; }
}

.scNav__searchBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--sc-shell-text);
  cursor: pointer;
}

.scNav__searchBtn:hover {
  background: rgba(15, 23, 42, 0.05);
}

.scNav__cta {
  display: inline-flex;
  align-items: center;
  background: var(--brand, #1a73e8);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.scNav__cta:hover {
  filter: brightness(1.05);
  color: #fff;
}

.scNav__mobileActions {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .scNav__mobileActions { display: none; }
}

.scNav__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}

.scNav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--sc-shell-text);
  border-radius: 1px;
}

.scNav__mobileMenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--sc-shell-border);
  padding: 4px 20px 24px;
  flex-direction: column;
  z-index: 49;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.scNav__mobileMenu:not([hidden]) {
  display: flex;
}

.scNav__mobileLink {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--sc-shell-text);
  padding: 14px 0;
  border-bottom: 1px solid var(--sc-shell-border);
  text-decoration: none;
}

.scNav__mobileCta {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand, #1a73e8);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}

.scNav__mobileCta:hover { color: #fff; }

.scNav__mobileFd { border-bottom: 1px solid var(--sc-shell-border); }

.scNav__mobileFdTrigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
  color: var(--sc-shell-text);
  padding: 14px 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.scNav__mobileFdCats {
  padding-bottom: 8px;
}

.scNav__mobileFdCats[hidden] { display: none; }

.scNav__mobileFdCats a {
  display: block;
  padding: 8px 0 8px 12px;
  font-size: 0.9rem;
  color: var(--sc-shell-muted);
  text-decoration: none;
}

.scNav__mobileFdCats a:hover { color: var(--brand, #1a73e8); }

/* ── Footer (light theme — matches nav / site shell) ── */
.rdFooter {
  margin-top: auto;
  background: var(--sc-shell-surface);
  border-top: 1px solid var(--sc-shell-border);
  color: var(--sc-shell-text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rdFooter__main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 28px;
}

.rdFooter__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)) minmax(12.5rem, 1.15fr);
  gap: 28px 20px;
}

@media (max-width: 1100px) {
  .rdFooter__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rdFooter__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .rdFooter__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .rdFooter__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .rdFooter__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
  }

  .rdFooter__main {
    padding: 36px 16px 24px;
  }

  .rdFooter__brand {
    grid-column: 1 / -1;
  }

  .rdFooter__col:last-child {
    grid-column: 1 / -1;
  }

  .rdFooter__desc {
    max-width: none;
  }

  .rdFooter__title {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }

  .rdFooter__links a {
    font-size: 0.8125rem;
  }

  .rdFooter__email a {
    white-space: nowrap;
    font-size: clamp(0.7rem, 3.2vw, 0.8125rem);
  }
}

.rdFooter__logo {
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sc-shell-text);
  text-decoration: none;
  margin-bottom: 14px;
  max-width: 300px;
  line-height: 0;
}

.rdFooter__logoImg,
.rdFooter__logo img {
  display: block;
  height: 52px;
  width: auto;
  max-height: 56px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 768px) {
  .rdFooter__logo {
    max-width: 340px;
  }

  .rdFooter__logoImg,
  .rdFooter__logo img {
    height: 56px;
    max-height: 60px;
  }
}

.rdFooter__desc {
  margin: 0;
  max-width: 300px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--sc-shell-muted);
}

.rdFooter__title {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-shell-text);
}

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

.rdFooter__links li {
  margin-bottom: 9px;
}

.rdFooter__links a {
  color: var(--sc-shell-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.rdFooter__links a:hover {
  color: var(--brand, #1a73e8);
}

.rdFooter__email {
  margin: 0;
  min-width: 0;
}

.rdFooter__email a {
  display: inline-block;
  color: var(--sc-shell-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.15s;
}

.rdFooter__email a:hover {
  color: var(--brand, #1a73e8);
}

.rdFooter__soon {
  color: var(--sc-shell-muted);
  font-size: 0.875rem;
  font-style: italic;
}

.rdFooter__regions {
  border-top: 1px solid var(--sc-shell-border);
  padding: 22px 24px;
  background: var(--sc-shell-bg);
}

.rdFooter__regionsGrid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px 18px;
}

@media (max-width: 900px) {
  .rdFooter__regionsGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .rdFooter__regionsGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.rdFooter__region {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sc-shell-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.15s;
}

.rdFooter__region:hover {
  color: var(--brand, #1a73e8);
}

.rdFooter__regionFlag {
  font-size: 1rem;
  line-height: 1;
}

.rdFooter__socialBar {
  position: relative;
  padding: 26px 24px;
  text-align: center;
  background: var(--sc-shell-bg);
}

.rdFooter__socialBar::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 1px;
  background: var(--sc-shell-border);
}

.rdFooter__social {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0 18px;
  background: var(--sc-shell-bg);
}

.rdFooter__social li {
  margin: 0;
  padding: 0;
  line-height: 0;
}

.rdFooter__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--sc-shell-border);
  color: var(--sc-shell-muted);
  background: #fff;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}

.rdFooter__social a:hover {
  color: var(--brand, #1a73e8);
  border-color: color-mix(in oklab, var(--brand, #1a73e8) 30%, #fff);
  background: color-mix(in oklab, var(--brand, #1a73e8) 8%, #fff);
  transform: translateY(-1px);
}

.rdFooter__social svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.rdFooter__bottom {
  border-top: 1px solid var(--sc-shell-border);
  padding: 18px 24px 28px;
  text-align: center;
  background: #fff;
}

.rdFooter__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--sc-shell-muted);
}

@media (prefers-reduced-motion: no-preference) {
  body.rd-page-animate .rdFooter {
    animation: rdPageEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }
}

/* Page enter animation */
@keyframes rdPageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.rd-page-animate .scNav {
    animation: rdPageEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body.rd-page-animate .siteMain {
    animation: rdPageEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.07s both;
  }
}
