/*
Theme Name: COMMEET AI
Theme URI: https://commeet.ai/
Author: COMMEET
Description: Lightweight custom WordPress theme for the COMMEET corporate website.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: commeet-ai
*/

:root {
  --bg: #F8F9FD;
  --surface: #ffffff;
  --surface-2: #eef4f7;
  --ink: #172033;
  --muted: #5f6b7c;
  --muted-2: #7a8796;
  --line: #dbe4eb;
  --primary: #5f7890;
  --primary-dark: #3f5668;
  --teal: #008c95;
  --green: #1d8b5f;
  --amber: #a86700;
  --red: #bd3f3f;
  --accent: #ef7a00;
  --shadow: 0 20px 52px rgba(22, 34, 52, 0.1);
  --radius: 8px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.7;
  letter-spacing: 1px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.22;
  letter-spacing: 0;
}

h1 {
  font-size: 60px;
  font-weight: 900;
}

h2 {
  font-size: 42px;
  font-weight: 850;
}

h3 {
  font-size: 21px;
  font-weight: 820;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  top: 12px;
  left: 12px;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  color: #172033;
  background: #fff;
  border: 1px solid #dbe4eb;
  border-radius: 8px;
  clip: auto;
}

.site-main {
  min-height: 60vh;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(219, 228, 235, 0.92);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 900;
  white-space: nowrap;
}

.topbar .brand-logo {
  display: block;
  width: auto;
  height: 60px;
}

.footer .brand-logo {
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
}

.nav-links .menu,
.footer-links .menu {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links .menu-item,
.footer-links .menu-item {
  list-style: none;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
  outline: none;
}

.nav-item,
.nav-links .menu > .menu-item-has-children {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-trigger,
.nav-links .menu > .menu-item-has-children > a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.nav-trigger::after,
.nav-links .menu > .menu-item-has-children > a::after {
  content: none;
}

.topbar .e-font-icon-svg.e-fas-caret-down {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 16px;
  fill: currentColor;
}

.nav-item:hover .nav-trigger,
.nav-item:focus-within .nav-trigger,
.nav-links .menu > .menu-item-has-children:hover > a,
.nav-links .menu > .menu-item-has-children:focus-within > a {
  color: var(--primary);
}

.dropdown-menu,
.nav-links .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 60;
  width: 310px;
  padding: 12px;
  margin: 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(22, 34, 52, 0.14);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.dropdown-menu::before,
.nav-links .sub-menu::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 0;
  left: 0;
  height: 14px;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu,
.nav-links .menu > .menu-item-has-children:hover > .sub-menu,
.nav-links .menu > .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu.wide {
  width: 520px;
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dropdown-section-title {
  margin: 4px 8px 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.dropdown-link,
.nav-links .sub-menu a {
  display: block;
  padding: 10px 11px;
  color: var(--ink);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.35;
}

.dropdown-link span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.dropdown-link:hover,
.dropdown-link:focus,
.nav-links .sub-menu a:hover,
.nav-links .sub-menu a:focus {
  color: var(--primary-dark);
  background: #eef3f6;
  outline: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 820;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(239, 122, 0, 0.22);
}

.btn-secondary,
.btn-dark {
  color: var(--accent);
  background: #ffffff;
  border-color: var(--accent);
}

.footer {
  padding: 56px 0;
  color: #dfe8ef;
  background: #172033;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer p {
  max-width: 520px;
  margin: 14px 0 0;
  color: #aeb9c5;
}

.footer a {
  color: inherit;
}

.footer a:hover,
.footer a:focus {
  color: #ffffff;
  outline: none;
}

.footer-links,
.footer-links .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px 22px;
  color: #dfe8ef;
  font-size: 14px;
  font-weight: 760;
}

.wp-content {
  /* width: min(960px, calc(100% - 48px)); */
  width: 100%;
  margin: 0 auto;
}

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

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.archive-card {
  display: block;
  height: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid #dbe4eb;
  border-radius: 8px;
}

.archive-card h2,
.archive-card h3 {
  margin: 0 0 10px;
}

.archive-card p {
  margin: 0;
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .nav {
    min-height: 66px;
  }

  .nav-links {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links,
  .footer-links .menu {
    justify-content: flex-start;
  }

  .nav-links .menu,
  .footer-links .menu {
    flex-wrap: wrap;
    gap: 14px;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }
}
