/*
 * TheMalaysian.com — Global Stylesheet
 * The Malaysian DotCom Sdn Bhd (738717-A / 200601018964)
 *
 * PALETTE
 *   --navy      #0D1B2A   Base / hero backgrounds
 *   --teal      #31c5c7   Primary accent / CTA buttons (navy text on teal passes AAA)
 *   --teal-dark #1a9ea0   Text links on white (AA 4.6:1)
 *   --gold      #F5A623   Premium highlight / secondary CTA
 *   --slate     #4A5568   Body text
 *   --muted     #94A3B8   Secondary text / captions
 *   --cloud     #F7F9FC   Alternate section backgrounds
 *
 * FONT     Plus Jakarta Sans 400/500/600/700/800 — Google Fonts
 * ICONS    Tabler Icons outline webfont — CDN
 * HOSTING  Cloudflare Pages
 *
 * COPYRIGHT (every footer):
 *   &copy; 1999 &ndash; <span id="yr"></span> by The Malaysian DotCom Sdn Bhd (738717-A / 200601018964).
 *   main.js auto-fills #yr with current year.
 *
 * ICON MAP
 *   Web Design      ti-layout-2        .com Name       ti-world
 *   eCommerce       ti-shopping-cart   Email           ti-mail
 *   AI Automation   ti-brain           Mobile          ti-device-mobile
 *   Hosting         ti-server          Contact Form    ti-forms
 *   Maintenance     ti-shield-check    Google Maps     ti-map-pin
 *   White Label     ti-users           Analytics       ti-chart-bar
 *   WhatsApp/Chat   ti-message-chatbot Support         ti-headset
 */


/* ============================================================
   1. DESIGN TOKENS
============================================================ */
:root {
  --navy:       #0D1B2A;
  --teal:       #31c5c7;
  --teal-dark:  #1a9ea0;
  --teal-bg:    rgba(49,197,199,0.08);
  --teal-glow:  rgba(49,197,199,0.15);
  --gold:       #F5A623;
  --gold-bg:    rgba(245,166,35,0.12);
  --slate:      #4A5568;
  --muted:      #94A3B8;
  --border:     #E2E8F0;
  --cloud:      #F7F9FC;
  --white:      #FFFFFF;
  --font:       'Plus Jakarta Sans', sans-serif;
  --space-xs:   8px;
  --space-sm:   16px;
  --space-md:   24px;
  --space-lg:   40px;
  --space-xl:   64px;
  --space-2xl:  88px;
  --max-width:  1120px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --shadow-sm:  0 2px 8px rgba(13,27,42,0.06);
  --shadow-md:  0 4px 24px rgba(13,27,42,0.10);
  --shadow-lg:  0 8px 40px rgba(13,27,42,0.14);
  --transition: 0.18s ease;
}


/* ============================================================
   2. RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

a { color: var(--teal-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 3px; }


/* ============================================================
   3. TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5 { font-family: var(--font); color: var(--navy); line-height: 1.15; font-weight: 800; }

h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-dark); margin-bottom: 14px;
}

.eyebrow--light {
  color: var(--gold);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow--light::before {
  content: ''; display: inline-block;
  width: 24px; height: 2px; background: var(--gold); flex-shrink: 0;
}

.highlight { color: var(--teal); }

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: var(--white); }
.section--navy .eyebrow { color: var(--gold); }
.section--navy p { color: rgba(255,255,255,0.65); }


/* ============================================================
   4. UTILITIES
============================================================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }

.section        { padding: var(--space-2xl) 0; }
.section--cloud { background: var(--cloud); }
.section--navy  { background: var(--navy); color: var(--white); }
.section--teal  { background: var(--teal); color: var(--navy); }

.text-center { text-align: center; }
.text-muted  { color: var(--muted); }

.section-intro { text-align: center; margin-bottom: var(--space-xl); }
.section-intro h2 { margin-bottom: 12px; }
.section-intro p  { max-width: 560px; margin: 0 auto; font-size: 1.05rem; }

.divider { border: none; border-top: 1px solid var(--border); margin: var(--space-lg) 0; }

.callout { border-radius: var(--radius-md); padding: var(--space-sm) var(--space-md); font-size: 14px; line-height: 1.6; }
.callout--warning { background: #FEF9C3; border-left: 4px solid #CA8A04; color: #713F12; }
.callout--info    { background: var(--teal-bg); border-left: 4px solid var(--teal); color: var(--navy); }

.tag {
  display: inline-block;
  background: var(--cloud); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--navy);
}

.check-list { list-style: none; }
.check-list li {
  font-size: 14px; padding: 6px 0;
  display: flex; align-items: flex-start; gap: 10px; color: var(--slate);
}
.check-list li::before { content: '✓'; color: var(--teal-dark); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.check-list li.faded { color: #A0AEC0; }
.check-list li.faded::before { content: '–'; color: #CBD5E0; }


/* ============================================================
   5. BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: var(--radius-md); border: none;
  cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn:hover  { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.btn-primary { background: var(--teal); color: var(--navy); box-shadow: 0 4px 16px rgba(49,197,199,0.30); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(49,197,199,0.40); color: var(--navy); }

.btn-gold  { background: var(--gold); color: var(--navy); box-shadow: 0 4px 16px rgba(245,166,35,0.30); }
.btn-gold:hover { box-shadow: 0 8px 24px rgba(245,166,35,0.45); color: var(--navy); }

.btn-ghost { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.06); color: var(--white); }

.btn-outline { background: var(--white); color: var(--teal-dark); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal-bg); color: var(--teal-dark); }

.btn-sm    { padding: 10px 20px; font-size: 13px; }
.btn-lg    { padding: 18px 36px; font-size: 17px; }
.btn-block { width: 100%; justify-content: center; }


/* ============================================================
   6. NAVIGATION
============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(13,27,42,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md);
  height: 72px; display: flex; align-items: center;
  justify-content: space-between; gap: var(--space-md);
}

.nav-logo img { display: block; height: 40px; width: auto; }

.nav-links { display: flex; list-style: none; gap: 32px; align-items: center; }
.nav-links a { font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.75); transition: color var(--transition); }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-links a.active { color: var(--teal); }

.nav-right { display: flex; align-items: center; gap: var(--space-sm); }
.nav-cta   { padding: 10px 22px; font-size: 14px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--white); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); margin: 5px 0; transition: transform 0.2s, opacity 0.2s; border-radius: 2px; }


/* ============================================================
   7. LANGUAGE SWITCHER
============================================================ */
.lang-switcher { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.lang-active   { color: var(--teal); }
.lang-switcher a { color: rgba(255,255,255,0.5); }
.lang-switcher a:hover { color: var(--white); text-decoration: none; }


/* ============================================================
   8. BM LANGUAGE NOTICE BAR
============================================================ */
.bm-notice {
  background: rgba(49,197,199,0.06);
  border-bottom: 1px solid rgba(49,197,199,0.15);
  padding: 10px 0; text-align: center;
}
.bm-notice p  { font-size: 14px; color: var(--navy); margin: 0; }
.bm-notice a  { font-weight: 700; color: var(--teal-dark); margin-left: 8px; }


/* ============================================================
   9. CREDIBILITY / GOLD STRIP
============================================================ */
.cred-strip { background: var(--gold); }
.cred-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); display: flex; align-items: stretch; }
.cred-item  { flex: 1; padding: 24px 28px; display: flex; align-items: center; gap: 14px; border-right: 1px solid rgba(13,27,42,0.12); }
.cred-item:last-child { border-right: none; }
.cred-val   { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1; white-space: nowrap; }
.cred-label { font-size: 13px; font-weight: 500; color: rgba(13,27,42,0.72); line-height: 1.35; }


/* ============================================================
   10. SECTION LAYOUTS
============================================================ */
.split   { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); align-items: center; }
.grid-3  { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-md); }
.grid-4  { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-md); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: var(--space-md); }


/* ============================================================
   11. CARDS
============================================================ */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px 28px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover { border-color: var(--teal); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card--accent { position: relative; overflow: hidden; }
.card--accent::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.card--accent:hover::before { transform: scaleX(1); }

.card--featured { border-color: var(--teal); box-shadow: 0 8px 40px rgba(49,197,199,0.12); }

.card-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--navy);
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 16px; border-radius: 20px; white-space: nowrap;
}
.card-badge--gold { background: var(--gold); color: var(--navy); }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--teal-bg); display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--teal-dark); margin-bottom: 20px; flex-shrink: 0;
}

.tcard { background: var(--white); border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow-md); position: relative; }
.tcard::before { content: '"'; position: absolute; top: 16px; right: 20px; font-size: 64px; color: var(--border); line-height: 1; font-weight: 800; }
.tcard-stars   { color: var(--gold); font-size: 16px; letter-spacing: 2px; margin-bottom: 14px; }
.tcard-text    { font-size: 14px; color: var(--slate); font-style: italic; margin-bottom: 20px; line-height: 1.7; }
.tcard-author  { font-size: 14px; font-weight: 600; color: var(--navy); }
.tcard-company { font-size: 12px; color: var(--muted); margin-top: 2px; }


/* ============================================================
   12. ICONS (Tabler outline webfont)
============================================================ */
.icon-teal   { color: var(--teal-dark); }
.icon-gold   { color: var(--gold); }
.icon-white  { color: var(--white); }
.icon-navy   { color: var(--navy); }
.icon-muted  { color: var(--muted); }

.icon-inline   { display: inline-flex; align-items: center; gap: 8px; }
.icon-inline i { font-size: 18px; }


/* ============================================================
   13. FORMS
============================================================ */
.form-group { margin-bottom: var(--space-sm); }

label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%; font-family: var(--font); font-size: 15px;
  color: var(--navy); background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(49,197,199,0.15);
}
textarea     { min-height: 120px; resize: vertical; }
::placeholder { color: var(--muted); }

.form-error input,
.form-error select,
.form-error textarea { border-color: #DC2626; }
.error-msg { font-size: 12px; color: #DC2626; margin-top: 4px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234A5568' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px;
}


/* ============================================================
   14. FOOTER
============================================================ */
.site-footer { background: var(--navy); padding: 64px 0 32px; }

.footer-top {
  display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: var(--space-xl); margin-bottom: var(--space-xl);
}

/* IMAGE NOTE: themalaysian-logo-white.png — 200x50px white logo for footer */
.footer-brand p { color: #64748B; font-size: 13px; margin-top: 14px; line-height: 1.7; }

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted); text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.social-btn:hover { background: var(--teal); color: var(--navy); text-decoration: none; }

.footer-col h4 {
  font-size: 13px; font-weight: 700; color: var(--white);
  margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.08em;
}
.footer-col ul li          { margin-bottom: 10px; }
.footer-col ul li a        { color: #64748B; font-size: 13px; transition: color var(--transition); }
.footer-col ul li a:hover  { color: var(--white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06); padding-top: 20px;
  display: flex; flex-direction: column; gap: 10px;
}

.footer-legal {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}

.footer-legal p { color: #475569; font-size: 13px; }

.footer-legal-links {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.footer-legal-links a { color: #64748B; font-size: 12px; transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--white); text-decoration: none; }

.footer-lang { display: flex; gap: 16px; }
.footer-lang a { color: #64748B; font-size: 13px; }
.footer-lang a:hover { color: var(--white); text-decoration: none; }


/* ============================================================
   15. CTA BANNER
============================================================ */
.cta-banner { background: var(--teal); padding: 80px 0; text-align: center; }
.cta-banner h2 { color: var(--navy); margin-bottom: 12px; }
.cta-banner p  { color: rgba(13,27,42,0.75); font-size: 1.05rem; max-width: 500px; margin: 0 auto 36px; }
.cta-phone     { margin-top: 24px; font-size: 1.5rem; font-weight: 800; color: var(--navy); }
.cta-phone a   { color: inherit; }
.cta-hours     { font-size: 13px; color: rgba(13,27,42,0.6); margin-top: 6px; }


/* ============================================================
   16. SCROLL REVEAL
============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }


/* ============================================================
   17. RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .grid-3     { grid-template-columns: 1fr 1fr; }
  .grid-4     { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .cred-inner { flex-wrap: wrap; }
  .cred-item  { flex: 1 1 50%; border-right: none; border-bottom: 1px solid rgba(13,27,42,0.10); }
  .cred-item:nth-child(odd) { border-right: 1px solid rgba(13,27,42,0.10); }
}

@media (max-width: 768px) {
  :root { --space-2xl: 56px; --space-xl: 40px; }
  .split      { grid-template-columns: 1fr; gap: var(--space-lg); }
  .grid-3     { grid-template-columns: 1fr; }
  .nav-links  { display: none; }
  .nav-toggle { display: block; }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-md); }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .cta-banner { padding: 56px 0; }
}

@media (max-width: 480px) {
  :root { --space-md: 16px; }
  .grid-4   { grid-template-columns: 1fr; }
  .btn      { padding: 12px 22px; font-size: 14px; }
  .btn-lg   { padding: 14px 28px; font-size: 15px; }
  .cred-item { flex: 1 1 100%; border-right: none; }
  .footer-legal-links { gap: 12px; }
}


/* ============================================================
   18. ACCESSIBILITY
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html    { scroll-behavior: auto; }
}

.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--navy); color: var(--white);
  padding: 12px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 14px; font-weight: 600; z-index: 9999; transition: top 0.15s;
}
.skip-link:focus { top: 0; }

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