/*
Theme Name: EACH Complete Redesign
Theme URI: https://eachvn.com/
Author: EACH VIET NAM
Description: Full visual redesign for EACH VIET NAM. Preserves existing page content while replacing the Lightning/Elementor visual shell.
Version: 2026.05.29.18
Requires at least: 6.0
Text Domain: each-complete-redesign
*/

:root {
  --each-ink: #101828;
  --each-muted: #5f6b7a;
  --each-soft: #eef5ff;
  --each-bg: #f7f9fc;
  --each-white: #ffffff;
  --each-line: rgba(16, 24, 40, 0.14);
  --each-blue: #1267d8;
  --each-blue-dark: #071b3d;
  --each-blue-light: #29a8ec;
  --each-green: var(--each-blue);
  --each-green-dark: var(--each-blue-dark);
  --each-gold: #c88a22;
  --each-shadow: 0 22px 54px rgba(7, 27, 61, 0.12);
  --each-hero-image: url("assets/images/saigon-river-skyline.jpg");
  --each-page-image: url("assets/images/saigon-riverside.jpg");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--each-bg);
  color: var(--each-ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  line-break: strict;
}

:where(h1, h2, h3, h4, h5, h6, p, li, a, button, label, th, td, .each-directory__lead, .each-card, .each-side, .each-alert) {
  word-break: keep-all;
  word-break: auto-phrase;
  overflow-wrap: normal;
  text-wrap: pretty;
}

:where(input, textarea, select, .each-map a, .each-content a) {
  word-break: normal;
  overflow-wrap: anywhere;
}

body.admin-bar .each-header {
  top: 32px;
}

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

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

.each-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(16, 24, 40, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.each-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 42px);
}

.each-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-width: 168px;
}

.each-logo__image {
  width: 168px;
  max-height: 60px;
  height: auto;
  object-fit: contain;
}

.each-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  color: #263449;
  font-size: 14px;
  font-weight: 800;
}

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

.each-nav li {
  position: relative;
}

.each-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  white-space: nowrap;
}

.each-nav a:hover {
  color: var(--each-blue);
}

.each-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -14px;
  display: grid;
  min-width: 230px;
  gap: 0;
  border: 1px solid rgba(16, 24, 40, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--each-shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.each-nav li:hover > .sub-menu,
.each-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.each-nav .sub-menu a {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 9px;
  color: #263449;
}

.each-nav .sub-menu a:hover {
  background: var(--each-soft);
  color: var(--each-blue);
}

.each-header__contact {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(18, 103, 216, 0.32);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--each-blue);
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.each-main {
  min-height: 70vh;
}

.each-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 42px);
}

.each-label {
  margin: 0 0 10px;
  color: var(--each-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.each-hero .each-label,
.each-page-hero .each-label,
.each-side .each-label,
.each-contact-band .each-label,
.each-footer .each-label {
  color: #8fd2ff;
}

.each-hero {
  display: grid;
  align-items: center;
  min-height: 590px;
  padding: clamp(54px, 7vw, 86px) clamp(20px, 5vw, 76px);
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(7, 27, 61, 0.9) 0%, rgba(18, 103, 216, 0.62) 46%, rgba(7, 27, 61, 0.12) 100%),
    var(--each-hero-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--each-blue-dark);
}

.each-hero__content {
  max-width: 820px;
}

.each-hero h1,
.each-page-hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(31px, 3.7vw, 50px);
  line-height: 1.2;
  letter-spacing: 0;
}

.each-hero p,
.each-page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.86;
}

.each-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.each-button,
.each-form button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.each-button--light {
  background: #fff;
  color: var(--each-green-dark);
}

.each-button--green,
.each-form button {
  background: var(--each-green);
  color: #fff;
}

.each-button--outline {
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #fff;
}

.each-statement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 27px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid var(--each-line);
  background: #fff;
}

.each-statement p {
  margin: 0;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 900;
  line-height: 1.5;
}

.each-statement strong {
  color: var(--each-green);
}

.each-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px clamp(20px, 5vw, 76px);
  background: #fff;
  border-bottom: 1px solid var(--each-line);
}

.each-photo-strip figure {
  position: relative;
  min-height: 245px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #dce8f7;
}

.each-photo-strip img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
}

.each-photo-strip figcaption {
  display: none;
}

.each-section {
  padding: 62px 0;
}

.each-section--paper {
  background: var(--each-soft);
}

.each-section__head {
  max-width: 780px;
  margin-bottom: 30px;
}

.each-section__head h2,
.each-contact-band h2 {
  margin: 0;
  color: var(--each-ink);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.34;
  letter-spacing: 0;
}

.each-grid {
  display: grid;
  gap: 16px;
}

.each-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.each-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.each-card,
.each-post-card {
  display: block;
  min-height: 100%;
  border: 1px solid var(--each-line);
  border-radius: 8px;
  background: #fff;
  padding: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

a.each-card:hover,
a.each-post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--each-shadow);
}

.each-card span {
  color: var(--each-gold);
  font-weight: 900;
}

.each-card h3,
.each-post-card h2,
.each-post-card h3 {
  margin: 13px 0 10px;
  color: var(--each-ink);
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: 0;
}

.each-card p,
.each-post-card p {
  margin: 0;
  color: var(--each-muted);
  line-height: 1.82;
}

.each-post-card time {
  color: #8a6a2d;
  font-size: 13px;
  font-weight: 900;
}

.each-page-hero {
  display: grid;
  align-items: end;
  min-height: 330px;
  padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 76px);
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(7, 27, 61, 0.94) 0%, rgba(18, 103, 216, 0.68) 48%, rgba(7, 27, 61, 0.18) 100%),
    var(--each-page-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--each-blue-dark);
}

.each-page-hero__inner {
  max-width: 900px;
}

.each-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(22px, 3vw, 36px);
  padding: 58px 0 68px;
}

.each-layout--story {
  grid-template-columns: minmax(0, 840px) 280px;
  align-items: start;
}

.each-content {
  min-width: 0;
  border: 1px solid var(--each-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 33, 29, 0.06);
  padding: clamp(22px, 4vw, 42px);
}

.each-page-greetings .each-content {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.each-greeting-story {
  display: grid;
  gap: 20px;
}

.each-greeting-intro,
.each-greeting-section {
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(7, 27, 61, 0.07);
}

.each-greeting-intro {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  align-items: start;
  border-top: 5px solid var(--each-blue);
  background:
    linear-gradient(135deg, rgba(238, 245, 255, 0.94), rgba(255, 255, 255, 1) 70%),
    #fff;
  padding: clamp(26px, 4vw, 44px);
}

.each-greeting-kicker {
  display: grid;
  gap: 12px;
  border-left: 4px solid var(--each-blue);
  padding-left: 14px;
}

.each-greeting-kicker span {
  color: #17213b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.each-greeting-intro h2 {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--each-ink);
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.22;
}

.each-greeting-intro p:not(.each-label) {
  max-width: 820px;
  margin: 0;
  color: #35435c;
  font-size: clamp(17px, 1.55vw, 20px);
  font-weight: 700;
  line-height: 1.9;
}

.each-greeting-section {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  padding: clamp(24px, 4vw, 40px);
}

.each-greeting-heading {
  border-left: 4px solid var(--each-blue);
  padding-left: 14px;
}

.each-greeting-section h2 {
  margin: 8px 0 0;
  color: var(--each-ink);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.32;
}

.each-greeting-body {
  max-width: 680px;
}

.each-greeting-section p:not(.each-label) {
  margin: 0 0 14px;
  color: #4b5c73;
  font-size: 16px;
  line-height: 1.9;
}

.each-greeting-section p:last-child {
  margin-bottom: 0;
}

.each-greeting-lead {
  color: #17213b !important;
  font-size: clamp(18px, 1.55vw, 20px) !important;
  font-weight: 900;
}

.each-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.each-value-grid article {
  border: 1px solid rgba(18, 103, 216, 0.16);
  border-radius: 8px;
  background: #f7fbff;
  padding: 18px;
}

.each-value-grid span {
  color: var(--each-blue);
  font-size: 13px;
  font-weight: 900;
}

.each-value-grid h3 {
  margin: 8px 0 8px;
  color: var(--each-ink);
  font-size: 19px;
}

.each-value-grid p {
  margin: 0 !important;
  font-size: 15px !important;
}

.each-greeting-section--blue {
  background:
    linear-gradient(135deg, rgba(7, 27, 61, 0.98), rgba(18, 103, 216, 0.86)),
    var(--each-blue-dark);
}

.each-greeting-section--blue .each-label {
  color: #8fd2ff;
}

.each-greeting-section--blue h2,
.each-greeting-section--blue p,
.each-greeting-section--blue .each-greeting-lead {
  color: #fff !important;
}

.each-greeting-section--blue h2 {
  border-left-color: #8fd2ff;
}

.each-greeting-section--blue .each-greeting-heading {
  border-left-color: #8fd2ff;
}

.each-greeting-section--blue p:not(.each-label) {
  color: rgba(255, 255, 255, 0.84) !important;
}

.each-content > *:first-child,
.each-content .elementor-widget-container > *:first-child {
  margin-top: 0;
}

.each-content > *:last-child,
.each-content .elementor-widget-container > *:last-child {
  margin-bottom: 0;
}

.each-content :where(.elementor-section, .elementor-container, .elementor-column, .elementor-widget-wrap, .elementor-widget-container) {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.each-content :where(.elementor-column, .elementor-widget-wrap) {
  display: block !important;
}

.each-content :where(.elementor-heading-title, [style*="font-size"]) {
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: 0 !important;
}

.each-content h1,
.each-content h2,
.each-content h3,
.each-content h4,
.each-content h5,
.each-content h6 {
  color: var(--each-ink);
  font-weight: 900;
  line-height: 1.42;
  letter-spacing: 0;
}

.each-content h1 {
  margin: 34px 0 14px;
  border-left: 4px solid var(--each-green);
  padding-left: 14px;
  font-size: clamp(22px, 2.25vw, 29px);
}

.each-content h2 {
  margin: 28px 0 12px;
  font-size: clamp(20px, 2vw, 25px);
}

.each-content h3 {
  margin: 24px 0 10px;
  font-size: clamp(18px, 1.8vw, 22px);
}

.each-content h4,
.each-content h5,
.each-content h6 {
  margin: 16px 0 8px;
  color: #34443d;
  font-size: 16px;
}

.each-content p,
.each-content li,
.each-content td,
.each-content th {
  color: #526059;
  font-size: 16px;
  line-height: 1.88;
}

.each-content p {
  margin: 0 0 15px;
}

.each-content ul,
.each-content ol {
  display: grid;
  gap: 7px;
  margin: 14px 0 18px;
  padding-left: 22px;
}

.each-content a {
  color: var(--each-green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.each-content img {
  width: auto;
  max-width: min(100%, 760px);
  border-radius: 8px;
}

.each-page-member .each-content img,
.each-page-japan-desk .each-content img,
.each-page-accountant .each-content img,
.each-page-lawyer .each-content img {
  width: 140px !important;
  height: 140px !important;
  max-width: 140px !important;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.each-page-member .each-content figure,
.each-page-japan-desk .each-content figure,
.each-page-accountant .each-content figure,
.each-page-lawyer .each-content figure {
  width: 140px !important;
  max-width: 140px !important;
  margin: 0 0 18px !important;
}

.each-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  overflow: hidden;
  border: 1px solid var(--each-line);
  border-radius: 8px;
}

.each-content th,
.each-content td {
  border-bottom: 1px solid var(--each-line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.each-content th {
  width: 30%;
  background: var(--each-soft);
  color: var(--each-ink);
}

.each-directory {
  display: grid;
  gap: 22px;
}

.each-directory__lead {
  max-width: 900px;
  margin: 0;
  border-left: 5px solid var(--each-blue);
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f6ff, #ffffff);
  box-shadow: 0 12px 28px rgba(7, 27, 61, 0.06);
  padding: 18px 20px;
  color: #17213b;
  font-size: clamp(18px, 1.7vw, 21px);
  font-weight: 800;
  line-height: 1.82;
}

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

.each-side {
  position: sticky;
  top: 94px;
  align-self: start;
  border-radius: 8px;
  background: #071b3d;
  color: #fff;
  padding: 18px;
}

.each-side__image {
  width: 100%;
  height: 116px;
  margin: 0 0 16px;
  border-radius: 8px;
  object-fit: cover;
}

.each-side h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: 0;
}

.each-side p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.78;
}

.each-side .each-button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}

.each-map {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  border-top: 1px solid var(--each-line);
  padding-top: 28px;
}

.each-map h2 {
  margin: 0 0 8px;
  color: var(--each-ink);
  font-size: clamp(21px, 2vw, 26px);
}

.each-map p {
  margin: 0 0 10px;
  color: #4b5c73;
  font-weight: 700;
}

.each-map a {
  color: var(--each-blue);
  font-weight: 900;
}

.each-map iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(7, 27, 61, 0.08);
}

.each-contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 58px clamp(20px, 5vw, 76px);
  background: var(--each-blue-dark);
  color: #fff;
}

.each-contact-band div {
  max-width: 780px;
}

.each-contact-band h2 {
  color: #fff;
  margin-bottom: 14px;
}

.each-contact-band p:not(.each-label) {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.85;
}

.each-form-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 64px 0;
}

.each-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--each-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(23, 33, 29, 0.06);
  padding: clamp(20px, 4vw, 34px);
}

.each-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.each-form label {
  display: grid;
  gap: 7px;
  color: var(--each-ink);
  font-weight: 900;
}

.each-form input,
.each-form textarea,
.each-form select {
  width: 100%;
  border: 1px solid var(--each-line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
  color: var(--each-ink);
  font: inherit;
}

.each-form textarea {
  min-height: 180px;
  resize: vertical;
}

.each-form input:focus,
.each-form textarea:focus,
.each-form select:focus {
  border-color: var(--each-green);
  outline: 3px solid rgba(18, 103, 216, 0.16);
}

.each-form__hidden {
  display: none;
}

.each-alert {
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 800;
}

.each-alert--success {
  background: #e7f0ec;
  color: var(--each-green);
}

.each-alert--error {
  background: #f8e8e5;
  color: #933626;
}

.each-footer {
  background: #071b3d;
  color: rgba(255, 255, 255, 0.76);
}

.each-footer__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px clamp(20px, 4vw, 42px);
}

.each-footer strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.each-footer__logo {
  width: 190px;
  max-height: 78px;
  height: auto;
  margin-bottom: 16px;
  object-fit: contain;
}

.each-footer p {
  margin: 0 0 7px;
  line-height: 1.7;
}

.each-footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.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;
}

@media (max-width: 1100px) {
  .each-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .each-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .each-header__contact {
    position: absolute;
    top: 14px;
    right: clamp(18px, 4vw, 42px);
  }
}

@media (max-width: 980px) {
  body.admin-bar .each-header {
    top: 0;
  }

  .each-statement,
  .each-contact-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .each-nav,
  .each-nav ul {
    flex-wrap: wrap;
  }

  .each-nav .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .each-nav li:hover > .sub-menu,
  .each-nav li:focus-within > .sub-menu {
    display: grid;
  }

  .each-grid--3,
  .each-grid--4,
  .each-photo-strip,
  .each-mini-grid,
  .each-value-grid,
  .each-greeting-intro,
  .each-greeting-section,
  .each-layout,
  .each-form-wrap,
  .each-footer__inner {
    grid-template-columns: 1fr;
  }

  .each-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .each-header__contact {
    position: static;
  }

  .each-nav {
    display: none;
  }

  .each-hero,
  .each-page-hero {
    min-height: 500px;
  }

  .each-actions .each-button,
  .each-contact-band .each-button,
  .each-form button {
    width: 100%;
  }

  .each-form__row {
    grid-template-columns: 1fr;
  }
}
