/*
Theme Name: TOP Consulting Asia
Theme URI: https://tca.eq-ventures.org
Author: TOP Consulting Asia
Author URI: https://tca.eq-ventures.org
Description: Official theme for TOP Consulting Asia - built on brand guidelines. Deep Plum, Wheat, Eggshell palette. Montserrat typeface. Elementor compatible.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Tags: consulting, business, elementor
*/

/* ── BRAND TOKENS ── */
:root {
  --plum:         #580F41;
  --plum-dark:    #3d0a2d;
  --plum-light:   #7a1559;
  --wheat:        #C8AA6F;
  --wheat-light:  #ddc38e;
  --wheat-dark:   #a88a50;
  --eggshell:     #E7E2DF;
  --eggshell-dark:#cfc8c4;
  --white:        #FFFFFF;
  --charcoal:     #1a1a1a;
  --mid-grey:     #6b6b6b;
  --light-grey:   #f5f3f1;
  --border:       rgba(88,15,65,0.12);
  --font:         'Montserrat', sans-serif;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
  --radius:       4px;
  --radius-lg:    8px;
  --shadow:       0 2px 20px rgba(88,15,65,0.08);
  --shadow-lg:    0 8px 40px rgba(88,15,65,0.15);
  --header-h:     80px;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); transition: var(--transition); }
a:hover { color: var(--plum-light); }

/* ── LAYOUT ── */
.tca-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.tca-main { padding-top: var(--header-h); min-height: 60vh; }
.tca-main.no-offset { padding-top: 0; }

/* ── HEADER ── */
.tca-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  height: var(--header-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.tca-header.scrolled {
  box-shadow: 0 2px 24px rgba(88,15,65,0.1);
}
.tca-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.tca-logo {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}
/* Fallback direct img (no custom logo set — uses theme bundled file) */
.tca-logo > img {
  height: 44px;
  width: auto;
  display: block;
}
/* WordPress custom_logo() output structure:
   .tca-logo > .custom-logo-link > img.custom-logo */
.tca-logo .custom-logo-link {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.tca-logo .custom-logo-link:focus {
  outline: 2px solid var(--wheat);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.tca-logo .custom-logo,
.tca-logo .custom-logo-link img {
  height: 44px !important;
  width: auto !important;
  max-height: 44px;
  max-width: none;
  display: block;
}

/* ── PRIMARY NAV ── */
.tca-nav {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}
.tca-nav li { position: relative; }
.tca-nav a {
  display: block;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.tca-nav a:hover,
.tca-nav li.current-menu-item > a,
.tca-nav li.current-page-ancestor > a {
  color: var(--plum);
  background: rgba(88,15,65,0.05);
}
.tca-nav .tca-nav-cta > a {
  background: var(--plum);
  color: var(--white) !important;
  padding: 0.5rem 1.1rem;
}
.tca-nav .tca-nav-cta > a:hover {
  background: var(--plum-dark);
}

/* ── DROPDOWN ── */
.tca-nav li:hover > .tca-dropdown { display: block; }
.tca-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 100;
  list-style: none;
}
.tca-dropdown a {
  font-size: 0.78rem;
  padding: 0.6rem 1rem;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.tca-dropdown a:hover { background: var(--light-grey); }

/* ── MOBILE HAMBURGER ── */
.tca-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.tca-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--plum);
  border-radius: 2px;
  transition: var(--transition);
}
.tca-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tca-hamburger.open span:nth-child(2) { opacity: 0; }
.tca-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV ── */
.tca-mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(88,15,65,0.1);
  z-index: 8999;
  padding: 0.75rem 1.5rem 1.5rem;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.tca-mobile-nav.open { display: block; }
/* wp_nav_menu outputs a <ul class="tca-mobile-menu"> */
.tca-mobile-nav .tca-mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tca-mobile-nav .tca-mobile-menu li {
  border-bottom: 1px solid var(--eggshell);
}
.tca-mobile-nav .tca-mobile-menu li:last-child {
  border-bottom: none;
}
.tca-mobile-nav .tca-mobile-menu a {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--charcoal);
  padding: 0.75rem 0;
  text-decoration: none;
  transition: var(--transition);
}
.tca-mobile-nav .tca-mobile-menu a:hover,
.tca-mobile-nav .tca-mobile-menu .current-menu-item a {
  color: var(--plum);
}
/* CTA item in mobile nav */
.tca-mobile-nav .tca-mobile-menu .tca-nav-cta a,
.tca-mobile-nav .tca-mobile-menu .tca-mobile-cta a {
  margin-top: 0.5rem;
  background: var(--plum);
  color: var(--white) !important;
  text-align: center;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: block;
}
/* Sub-menus in mobile: show flat, indented */
.tca-mobile-nav .tca-mobile-menu .sub-menu {
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 0;
}
.tca-mobile-nav .tca-mobile-menu .sub-menu li {
  border-bottom: none;
}
.tca-mobile-nav .tca-mobile-menu .sub-menu a {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.5rem 0;
  color: var(--mid-grey);
}

/* ── FOOTER ── */
.tca-footer {
  background: var(--charcoal);
  padding: 3.5rem 0 1.5rem;
  margin-top: 0;
}
.tca-footer-grid {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1.5rem;
  align-items: start;
}
.tca-footer-logo img {
  height: 72px;
  width: auto;
  margin-bottom: 1rem;
}
.tca-footer-tagline {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.7;
  font-style: italic;
}
.tca-footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 2rem;
}
.tca-footer-nav a {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: var(--transition);
  padding: 0.2rem 0;
}
.tca-footer-nav a:hover { color: var(--wheat); }
.tca-footer-contact { text-align: right; }
.tca-footer-contact-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wheat-dark);
  margin-bottom: 0.4rem;
}
.tca-footer-contact-phone {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.tca-footer-contact-addr {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.65;
}
.tca-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tca-footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
}
.tca-footer-legal {
  display: flex;
  gap: 1.25rem;
}
.tca-footer-legal a {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: var(--transition);
}
.tca-footer-legal a:hover { color: rgba(255,255,255,0.55); }

/* ── PAGE CONTENT WRAPPER ── */
.tca-page-content {
  padding: 0;
}
.tca-page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* ── SHARED SECTION STYLES ── */
.section { padding: 80px 0; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wheat-dark);
  margin-bottom: 1rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--wheat);
}
.section-heading {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--plum);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--mid-grey);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--wheat);
  color: var(--plum-dark);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
  border: 2px solid var(--wheat);
}
.btn-primary:hover {
  background: var(--wheat-light);
  border-color: var(--wheat-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,170,111,0.3);
  color: var(--plum-dark);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--white);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.35);
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── 404 PAGE ── */
.tca-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.tca-404-num {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--eggshell);
  line-height: 1;
  margin-bottom: 1rem;
}
.tca-404-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--plum);
  margin-bottom: 0.75rem;
}
.tca-404-body {
  font-size: 1rem;
  color: var(--mid-grey);
  margin-bottom: 2rem;
  max-width: 400px;
}

/* ── BLOG / TRENDS ── */
.tca-archive-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.tca-post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.tca-post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(88,15,65,0.2);
}
.tca-post-card-accent { height: 4px; background: var(--plum); }
.tca-post-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.tca-post-card-cat {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wheat-dark);
  margin-bottom: 0.6rem;
}
.tca-post-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--plum);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
.tca-post-card-excerpt {
  font-size: 0.82rem;
  color: var(--mid-grey);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}
.tca-post-card-link {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plum);
  margin-top: auto;
}
.tca-no-posts {
  background: var(--light-grey);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--mid-grey);
}

/* ── SINGLE POST ── */
.tca-single-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.tca-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.tca-post-date {
  font-size: 0.75rem;
  color: var(--mid-grey);
  font-weight: 500;
}
.tca-post-cat-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(88,15,65,0.07);
  color: var(--plum);
  padding: 0.2rem 0.65rem;
  border-radius: 2rem;
}
.tca-single-post h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--plum);
  line-height: 1.2;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}
.tca-post-content {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.85;
}
.tca-post-content h2 { font-size: 1.25rem; font-weight: 800; color: var(--plum); margin: 2rem 0 0.75rem; }
.tca-post-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--plum); margin: 1.5rem 0 0.5rem; }
.tca-post-content p { margin-bottom: 1.25rem; }
.tca-post-content ul, .tca-post-content ol { margin: 1rem 0 1.25rem 1.5rem; }
.tca-post-content li { margin-bottom: 0.4rem; }
.tca-post-content strong { color: var(--plum); font-weight: 700; }
.tca-post-content blockquote {
  border-left: 3px solid var(--wheat);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--light-grey);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--mid-grey);
}
.tca-post-cta {
  margin-top: 3rem;
  background: var(--plum);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
}
.tca-post-cta p {
  color: rgba(231,226,223,0.8);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

/* ── ELEMENTOR COMPAT ── */
.elementor-page .tca-main { padding-top: var(--header-h); }
.elementor-section, .elementor-container { max-width: 100% !important; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .tca-footer-grid { grid-template-columns: 1fr 1fr; }
  .tca-footer-contact { grid-column: 1/-1; text-align: left; }
}
@media (max-width: 900px) {
  .tca-nav { display: none; }
  .tca-hamburger { display: flex; }
  .tca-archive-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 68px; }
  .tca-container { padding: 0 1.25rem; }
  .tca-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .tca-footer-nav { grid-template-columns: 1fr; }
  .tca-footer-contact { text-align: left; }
  .tca-archive-grid { grid-template-columns: 1fr; }
  .tca-footer-bottom { flex-direction: column; align-items: flex-start; }
}
