/*
Theme Name: Connectrapy
Theme URI: https://connectrapy.com
Author: BBCMGTai Inc.
Description: Connectrapy - Mental Health, Your Way
Version: 3.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --green-dark: #1a8c2e;
  --green-light: #6DBE45;
  --blue: #1A47CC;
  --white: #ffffff;
  --off-white: #f8faf7;
  --gray: #6b7280;
  --border: #e2e8f0;
  --text: #1a1a2e;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  padding-top: 110px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ===== ALERT BANNER ===== */
.alert-banner {
  background: linear-gradient(90deg, var(--green-dark), var(--blue));
  color: white;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}
.alert-banner a {
  color: var(--green-light);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 8px;
}
.alert-banner .close-banner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 999;
  background: white;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-dark);
}
.site-logo img { height: 40px; width: auto; }
.site-logo .logo-text span { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green-dark); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  color: white !important;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,140,46,0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--green-dark) !important;
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--green-dark);
  transition: all 0.3s;
  display: inline-block;
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--green-dark);
  color: white !important;
}

.btn-outline-white {
  background: transparent;
  color: white !important;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.6);
  transition: all 0.3s;
  display: inline-block;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: white; }

.btn-large {
  padding: 16px 40px;
  font-size: 16px;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== APP INSTALL POPUP ===== */
.app-popup {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  z-index: 9998;
  max-width: 320px;
  display: none;
  animation: slideUp 0.4s ease;
}
@media (max-width: 768px) {
  .app-popup {
    left: 12px;
    right: 12px;
    bottom: 16px;
    max-width: 100%;
    width: auto;
  }
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.app-popup.show { display: block; }
.app-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.app-popup-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}
.app-popup-title { font-weight: 700; font-size: 15px; }
.app-popup-subtitle { font-size: 12px; color: var(--gray); }
.app-popup p { font-size: 13px; color: var(--gray); margin-bottom: 16px; line-height: 1.5; }
.app-popup-btns { display: flex; gap: 8px; }
.app-popup-btns a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.app-popup-btns .btn-install {
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  color: white !important;
}
.app-popup-btns .btn-dismiss {
  background: var(--off-white);
  color: var(--gray) !important;
  border: 1px solid var(--border);
}
.app-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--gray);
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0f1a0f;
  color: white;
  padding: 64px 24px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: white;
  margin-bottom: 12px;
}
.footer-brand .logo span { color: var(--green-light); }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--green-dark); }
.footer-col h4 { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--green-light); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul li a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.footer-bottom a:hover { color: white; }

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0f5c1e 60%, var(--blue) 100%);
  padding: 80px 24px;
  text-align: center;
  color: white;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 16px;
}
.page-hero p { font-size: 18px; opacity: 0.85; max-width: 600px; margin: 0 auto; }

/* ===== SECTIONS ===== */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 16px;
  line-height: 1.2;
}
.section-title em { color: var(--green-dark); font-style: italic; }
.section-subtitle { font-size: 16px; color: var(--gray); max-width: 560px; line-height: 1.7; }

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 32px;
  transition: all 0.3s;
}
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }

/* ===== CONTACT FORM ===== */
.wpcf7-form input,
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus { border-color: var(--green-dark); }
.wpcf7-form textarea { min-height: 120px; resize: vertical; }
.wpcf7-form input[type="submit"] {
  background: linear-gradient(135deg, var(--green-dark), var(--green-light));
  color: white;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  padding: 14px 40px;
  width: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  body { padding-top: 130px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 60px 20px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* Alert banner — compact, single line */
  .alert-banner {
    font-size: 12px;
    padding: 8px 40px 8px 12px;
    line-height: 1.4;
    position: fixed;
    top: 0;
    z-index: 9999;
  }
  .alert-banner a { display: inline; }

  /* Header sits below banner */
  .site-header { top: 48px; }

  /* Body accounts for banner + header */
  body { padding-top: 116px; }

  /* Nav inner — logo left, hamburger right only */
  .nav-inner {
    padding: 0 16px;
    height: 56px;
  }

  /* Logo fix */
  .site-logo {
    font-size: 18px;
  }
  .site-logo img {
    height: 30px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
  }

  /* Hide desktop nav links and CTA buttons */
  .nav-links { display: none; }
  .nav-cta .btn-secondary { display: none; }
  .nav-cta .btn-primary { display: none; }

  /* Show hamburger only */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    margin-left: auto;
  }
  .hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
  }

  /* Mobile dropdown menu */
  .nav-links.open {
    display: flex !important;
    position: fixed;
    top: 104px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 997;
    border-top: 1px solid var(--border);
  }
  .nav-links.open a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    display: block;
  }
  /* Add Book + App links inside mobile menu */
  .mobile-menu-cta {
    display: flex;
    gap: 12px;
    padding: 16px 24px 0;
  }
  .mobile-menu-cta a {
    flex: 1;
    text-align: center;
    padding: 12px !important;
    border-radius: 100px !important;
    font-weight: 600;
    font-size: 14px !important;
    border-bottom: none !important;
  }
}

@media (min-width: 769px) {
  .hamburger { display: none !important; }
  .mobile-menu-cta { display: none !important; }
  .nav-links { display: flex !important; }
  .nav-cta .btn-secondary { display: inline-block !important; }
  .nav-cta .btn-primary { display: inline-block !important; }
}
