/* =====================================================
   CMH CONSULTANCY — MAIN STYLESHEET
   Brand Colors:
   Navy:  #0A1628
   Light Blue:  #0EA5E9
   Gold:  #F59E0B
   Light: #F8FAFC
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #0A1628;
  --navy-light: #132035;
  --teal: #0EA5E9;
  --teal-dark: #0284C7;
  --gold: #F59E0B;
  --gold-dark: #d97706;
  --white: #ffffff;
  --light: #F8FAFC;
  --gray: #94a3b8;
  --dark-text: #1E293B;
  --light-text: #E2E8F0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.6;
}

/* ---- UTILITIES ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-dark { background: var(--navy); color: var(--light-text); }
.section-light { background: var(--light); }

.text-teal { color: var(--teal); }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-center { text-align: center; }

.badge {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: rgba(14,165,233,.15);
  color: var(--teal);
  border: 1px solid rgba(14,165,233,.3);
  margin-bottom: 1rem;
}

h1,h2,h3,h4 { font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .875rem 2rem; border-radius: 8px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: none; transition: all .2s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal); color: var(--navy);
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(14,165,233,.35); }
.btn-secondary {
  background: transparent; color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-secondary:hover { background: rgba(14,165,233,.1); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-lg { padding: 1.125rem 2.5rem; font-size: 1.125rem; }
.btn-full { width: 100%; }

/* ---- HEADER ---- */
#site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(10,22,40,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14,165,233,.15);
  transition: all .3s;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; max-width: 1200px; margin: 0 auto;
}
.site-logo { text-decoration: none; }
.logo-text { font-size: 1.5rem; font-weight: 900; color: var(--white); letter-spacing: -.02em; }
.logo-text span { color: var(--teal); }

nav.main-nav ul {
  display: flex; list-style: none; gap: 2rem; align-items: center;
}
nav.main-nav a {
  color: var(--light-text); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: color .2s;
}
nav.main-nav a:hover { color: var(--teal); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.hamburger { display: block; width: 24px; height: 2px; background: var(--white); position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 24px; height: 2px; background: var(--white); }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

@media (max-width: 768px) {
  nav.main-nav { display: none; }
  nav.main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 1rem; }
  nav.main-nav.open ul { flex-direction: column; gap: 1rem; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
}

/* ---- HERO ---- */
.hero {
  background:
    linear-gradient(110deg, rgba(10,22,40,.97) 0%, rgba(10,22,40,.88) 45%, rgba(10,22,40,.55) 100%),
    linear-gradient(0deg, rgba(10,22,40,.6) 0%, transparent 40%),
    url('../images/hero-bg.jpg') center right/cover no-repeat;
  padding: 6rem 0 4rem; min-height: 85vh;
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(14,165,233,.12) 0%, transparent 70%);
  pointer-events: none;
}
/* ---- SECTION IMAGES ---- */
.section-img { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.12); }
.section-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.img-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 768px) { .img-text-grid { grid-template-columns: 1fr; } }
.results-banner { position: relative; border-radius: 20px; overflow: hidden; margin: 2rem 0 3rem; aspect-ratio: 21/9; }
.results-banner img { width: 100%; height: 100%; object-fit: cover; }
.results-banner .overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,22,40,.85) 0%, rgba(10,22,40,.1) 60%, transparent 100%); }
.results-banner .caption { position: absolute; bottom: 1.5rem; left: 1.75rem; color: #fff; font-size: 1.4rem; font-weight: 800; max-width: 30rem; font-family: var(--font-display, inherit); }
.hero-content { position: relative; z-index: 1; }
.hero-tag { margin-bottom: 1.5rem; }
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero-subtitle { font-size: 1.2rem; color: var(--gray); margin-bottom: 2.5rem; max-width: 600px; line-height: 1.7; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 2rem; font-weight: 900; color: var(--teal); }
.hero-stat span { font-size: .85rem; color: var(--gray); }

/* ---- STATS COUNTER ---- */
.stats-section { background: var(--navy-light); padding: 3rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; }
.stat-card { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 900; color: var(--teal); display: block; }
.stat-label { color: var(--gray); font-size: .9rem; }

/* ---- SERVICES ---- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }
.service-card {
  background: var(--white); border-radius: 16px;
  border: 1px solid #e2e8f0; padding: 2rem;
  transition: all .3s; position: relative; overflow: hidden;
}
.service-card:hover { border-color: var(--teal); transform: translateY(-4px); box-shadow: 0 12px 40px rgba(14,165,233,.12); }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--gold)); }
.service-icon { width: 56px; height: 56px; border-radius: 12px; background: rgba(14,165,233,.1); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.service-icon svg { width: 28px; height: 28px; color: var(--teal); }
.service-stat { display: inline-block; font-size: 1.5rem; font-weight: 900; color: var(--teal); }
.service-stat-label { font-size: .8rem; color: var(--gray); display: block; margin-bottom: 1rem; }
.service-card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.service-card p { color: #64748b; font-size: .95rem; margin-bottom: 1rem; }
.service-benefit { font-size: .85rem; color: var(--teal); font-weight: 600; }

/* ---- CALCULATOR ---- */
.calculator-section { background: var(--navy); padding: 5rem 0; }
.calc-wrapper { max-width: 780px; margin: 0 auto; }
.calc-box { background: var(--navy-light); border-radius: 20px; border: 1px solid rgba(14,165,233,.2); padding: 2.5rem; }
.calc-progress { display: flex; gap: .5rem; margin-bottom: 2rem; }
.calc-step-dot { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); transition: background .3s; }
.calc-step-dot.active { background: var(--teal); }
.calc-step { display: none; }
.calc-step.active { display: block; }
.calc-step h3 { color: var(--white); margin-bottom: .5rem; }
.calc-step p { color: var(--gray); margin-bottom: 1.5rem; font-size: .95rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; color: var(--light-text); margin-bottom: .5rem; font-size: .9rem; font-weight: 500; }
.form-group input[type="number"], .form-group select {
  width: 100%; padding: .875rem 1rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05); color: var(--white);
  font-size: 1rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--teal); }
.radio-group { display: grid; gap: .75rem; }
.radio-option { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); cursor: pointer; transition: all .2s; }
.radio-option:hover { border-color: var(--teal); background: rgba(14,165,233,.05); }
.radio-option input { accent-color: var(--teal); width: 18px; height: 18px; }
.radio-option label { color: var(--light-text); cursor: pointer; font-size: .95rem; }
.calc-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; }
.calc-results { display: none; }
.calc-results.show { display: block; }
.results-hero { text-align: center; padding: 2.5rem 0; }
.results-amount { font-size: 3.5rem; font-weight: 900; color: var(--teal); }
.results-period { color: var(--gray); }
.results-breakdown { margin: 2rem 0; }
.breakdown-item { display: flex; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.08); color: var(--light-text); }
.breakdown-value { color: var(--teal); font-weight: 700; }

/* ---- SOCIAL PROOF ---- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.testimonial-card { background: var(--navy-light); border-radius: 16px; padding: 2rem; border: 1px solid rgba(14,165,233,.15); }
.testimonial-stars { color: var(--gold); font-size: 1.25rem; margin-bottom: 1rem; }
.testimonial-text { color: var(--light-text); font-size: .95rem; line-height: 1.7; margin-bottom: 1.5rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--gold)); display: flex; align-items: center; justify-content: center; color: var(--navy); font-weight: 800; font-size: 1.1rem; }
.author-name { font-weight: 700; color: var(--white); font-size: .95rem; }
.author-biz { font-size: .8rem; color: var(--gray); }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 3rem auto 0; }
.faq-item { border-bottom: 1px solid #e2e8f0; }
.faq-question {
  width: 100%; background: none; border: none; text-align: left; padding: 1.25rem 0;
  font-size: 1rem; font-weight: 600; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; color: var(--dark-text);
}
.faq-question .faq-icon { font-size: 1.5rem; color: var(--teal); transition: transform .3s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1.25rem; color: #64748b; line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* ---- BLOG ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 3rem; }
.blog-card { background: var(--white); border-radius: 16px; overflow: hidden; border: 1px solid #e2e8f0; transition: all .3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.1); border-color: var(--teal); }
.blog-card-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog-card-body { padding: 1.5rem; }
.blog-category { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--teal); margin-bottom: .5rem; display: block; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: .75rem; line-height: 1.4; }
.blog-card h3 a { text-decoration: none; color: var(--dark-text); }
.blog-card h3 a:hover { color: var(--teal); }
.blog-excerpt { color: #64748b; font-size: .9rem; line-height: 1.6; margin-bottom: 1rem; }
.blog-meta { font-size: .8rem; color: var(--gray); }

/* ---- SINGLE POST ---- */
.post-hero { background: var(--navy); padding: 5rem 0 3rem; }
.post-hero h1 { color: var(--white); max-width: 800px; }
.post-meta { color: var(--gray); margin-top: 1rem; }
.post-content-wrapper { max-width: 800px; margin: 0 auto; padding: 3rem 1.5rem; }
.post-featured-img { width: 100%; border-radius: 16px; height: 400px; object-fit: cover; margin-bottom: 2.5rem; }
.post-content h2 { font-size: 1.75rem; margin: 2rem 0 1rem; color: var(--navy); }
.post-content h3 { font-size: 1.35rem; margin: 1.5rem 0 .75rem; color: var(--navy); }
.post-content p { margin-bottom: 1.25rem; line-height: 1.8; color: #374151; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: .5rem; line-height: 1.7; color: #374151; }
.post-content strong { color: var(--navy); }
.post-cta-box { background: linear-gradient(135deg, var(--navy), #0d2040); border-radius: 16px; padding: 2.5rem; text-align: center; margin-top: 3rem; border: 1px solid rgba(14,165,233,.2); }
.post-cta-box h3 { color: var(--white); margin-bottom: 1rem; }
.post-cta-box p { color: var(--gray); margin-bottom: 2rem; }

/* ---- FOOTER ---- */
#site-footer { background: #060d1a; color: var(--light-text); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--gray); margin-top: 1rem; font-size: .9rem; line-height: 1.7; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--teal); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: var(--gray); text-decoration: none; font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { color: var(--gray); font-size: .85rem; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-ctas { flex-direction: column; }
  .hero-stats { gap: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- FLOATING WHATSAPP ---- */
.wa-float {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 999;
  background: #25D366; border-radius: 50%; width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  animation: pulse-wa 2s infinite;
  text-decoration: none;
}
.wa-float svg { width: 32px; height: 32px; fill: white; }
@keyframes pulse-wa {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.4); }
  50% { box-shadow: 0 4px 40px rgba(37,211,102,.7); }
}

/* ---- CTA MODAL ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(6,13,26,.85); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--navy-light); border-radius: 20px;
  border: 1px solid rgba(14,165,233,.25);
  padding: 2.5rem; max-width: 420px; width: 90%;
  position: relative;
}
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--gray); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: var(--white); }
.modal-title { text-align: center; color: var(--white); margin-bottom: .5rem; font-size: 1.35rem; }
.modal-sub { text-align: center; color: var(--gray); margin-bottom: 2rem; font-size: .9rem; }
.modal-btn { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; border-radius: 12px; margin-bottom: 1rem; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.modal-btn:hover { transform: translateY(-2px); }
.modal-btn-wa { background: #25D366; color: var(--white); }
.modal-btn-wa:hover { box-shadow: 0 8px 24px rgba(37,211,102,.35); }
.modal-btn-call { background: var(--navy); color: var(--white); border: 2px solid rgba(14,165,233,.3); }
.modal-btn-call:hover { border-color: var(--teal); box-shadow: 0 8px 24px rgba(14,165,233,.15); }
.modal-btn-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-btn-text strong { display: block; font-size: 1rem; }
.modal-btn-text span { font-size: .8rem; opacity: .8; }

/* ---- EXIT INTENT ---- */
.exit-popup { display: none; position: fixed; inset: 0; z-index: 9998; background: rgba(6,13,26,.9); align-items: center; justify-content: center; }
.exit-popup.open { display: flex; }
.exit-box { background: var(--navy); border: 1px solid rgba(14,165,233,.3); border-radius: 20px; max-width: 500px; width: 90%; padding: 3rem 2rem; text-align: center; }
.exit-box h2 { color: var(--white); font-size: 1.75rem; margin-bottom: 1rem; }
.exit-box p { color: var(--gray); margin-bottom: 2rem; }
.exit-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--gray); font-size: 1.5rem; cursor: pointer; }

/* ---- PAGE TEMPLATES ---- */
.page-hero { background: var(--navy); padding: 5rem 0 3rem; text-align: center; }
.page-hero h1 { color: var(--white); }
.page-hero p { color: var(--gray); max-width: 600px; margin: 1rem auto 0; }

.about-content { max-width: 800px; margin: 0 auto; }
.about-content h2 { color: var(--navy); margin-bottom: 1rem; }
.about-content p { line-height: 1.8; color: #374151; }
.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.value-card { background: var(--light); border-radius: 12px; padding: 1.5rem; border-left: 4px solid var(--teal); }
.value-card h4 { color: var(--navy); margin-bottom: .5rem; }
.value-card p { color: #64748b; font-size: .9rem; margin: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info h2 { color: var(--white); margin-bottom: 1.5rem; }
.contact-detail { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-detail-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(14,165,233,.1); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.25rem; }
.contact-detail-text strong { display: block; color: var(--white); }
.contact-detail-text span { color: var(--gray); font-size: .9rem; }

.cta-section { background: linear-gradient(135deg, var(--navy), #0d2040); padding: 5rem 0; text-align: center; }
.cta-section h2 { color: var(--white); margin-bottom: 1rem; }
.cta-section p { color: var(--gray); max-width: 600px; margin: 0 auto 2.5rem; }

/* Trust badges */
.trust-bar { background: var(--navy-light); padding: 1.5rem 0; border-top: 1px solid rgba(14,165,233,.1); border-bottom: 1px solid rgba(14,165,233,.1); }
.trust-items { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.trust-item { display: flex; align-items: center; gap: .5rem; color: var(--gray); font-size: .9rem; font-weight: 500; }
.trust-item span { font-size: 1.25rem; }

/* ---- Custom Logo (Customizer) ---- */
.site-logo--image img { max-height: 48px; width: auto; height: auto; display: block; }

/* ---- Widget Areas ---- */
.cmh-widgets { padding: 2rem 0; }
.widget { margin-bottom: 1.5rem; }
.widget .widget-title { font-size: 1.1rem; margin-bottom: .75rem; }
.widget ul { list-style: none; }
.widget ul li { margin-bottom: .4rem; }
.widget a { text-decoration: none; transition: color .2s ease; }

/* Mobile layout repair: allow CTA labels and grid children to shrink. */
.btn { white-space: normal; max-width: 100%; text-align: center; overflow-wrap: anywhere; }
.hero-content, .hero-ctas, .hero-ctas > *, .img-text-grid > *, .contact-grid > * { min-width: 0; }
@media (max-width: 768px) {
  .hero-ctas { width: 100%; }
  .hero-ctas .btn { width: 100%; padding: 1rem; font-size: 1rem; line-height: 1.4; }
  .hero-subtitle { overflow-wrap: break-word; }
}
