/* Contact page - modern design.
   Loaded only when $contactStyle = 'modern' in pages/contact.php (set it to 'classic' to revert). */

/* ---------- hero ---------- */
.cn-hero {
  position: relative;
  padding: 7.5rem 1.5rem 5.5rem;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(155deg, #16322e 0%, #234e48 50%, #2f6a61 100%);
  isolation: isolate;
}
.cn-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cn-orb { position: absolute; border-radius: 50%; filter: blur(70px); }
.cn-orb-1 { width: 380px; height: 380px; top: -140px; right: -110px; background: #ff7a52; opacity: .22; }
.cn-orb-2 { width: 340px; height: 340px; bottom: -150px; left: -100px; background: #3fb7a3; opacity: .26; }
.cn-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}
.cn-hero-inner { max-width: 720px; margin: 0 auto; animation: cn-up .7s ease-out both; }
.cn-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffd9c9;
}
.cn-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #f57450; animation: cn-pulse 2s ease-in-out infinite; }
.cn-hero-title { margin: 1rem 0 .6rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: clamp(2.5rem, 7vw, 4.4rem); font-weight: 700; line-height: 1.05; color: #fff; }
.cn-hero-title em {
  font-style: italic;
  display: inline-block;
  padding: 0 .06em .12em 0;
  background: linear-gradient(90deg, #ff8f6b, #ffd0a8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cn-hero-sub { margin: 0 0 .9rem; font-size: clamp(1.05rem, 2.4vw, 1.3rem); font-weight: 600; color: rgba(255, 255, 255, .92); }
.cn-hero-text { margin: 0 auto; max-width: 560px; font-size: 1.02rem; line-height: 1.7; color: rgba(255, 255, 255, .78); }
.cn-hero-text a { color: #ffb199; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- main ---------- */
.cn-main {
  padding: 0 1.25rem 3.5rem;
  background: #f5f7f2;
  background-image: radial-gradient(rgba(35, 78, 72, .05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.cn-grid {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 1.6rem;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  top: -3rem;
  margin-bottom: -1rem;
  align-items: start;
}

/* info cards */
.cn-info { display: grid; gap: 1rem; }
.cn-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e4eae1;
  box-shadow: 0 10px 28px rgba(35, 78, 72, .09);
  text-decoration: none;
  color: #1c3b36;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cn-card-link:hover, .cn-card-link:focus-visible { transform: translateY(-4px); border-color: #f57450; box-shadow: 0 18px 38px rgba(35, 78, 72, .16); color: #1c3b36; outline: none; }

.cn-ico {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}
.cn-coral { background: linear-gradient(135deg, #f57450, #e8431e); }
.cn-teal { background: linear-gradient(135deg, #2f9a7e, #3fb7a3); }
.cn-violet { background: linear-gradient(135deg, #6d44d6, #a78bfa); }
.cn-gold { background: linear-gradient(135deg, #e8a200, #ffc53d); }

.cn-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; flex: 1; }
.cn-card-text small { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #7a8a84; margin-bottom: .2rem; }
.cn-card-text strong { font-size: 1.05rem; color: #1c3b36; }
.cn-card-text > span { font-size: .9rem; color: #5b6b65; }
.cn-break { word-break: break-word; }
.cn-more { margin-top: .4rem; font-style: normal; font-size: .82rem; font-weight: 700; color: #e8431e; }
.cn-more .fa-arrow-right { font-size: .7rem; transition: transform .2s ease; }
.cn-card-link:hover .cn-more .fa-arrow-right { transform: translateX(4px); }

.cn-times ul { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; gap: .45rem; }
.cn-times li { display: flex; flex-direction: column; padding: .45rem .7rem; border-radius: 10px; background: #f3f6f1; }
.cn-times li b { font-size: .9rem; color: #1c3b36; }
.cn-times li span { font-size: .85rem; color: #5b6b65; }

.cn-social { display: flex; gap: .65rem; padding-top: .3rem; }
.cn-social a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #234e48;
  color: #fff;
  box-shadow: 0 8px 18px rgba(35, 78, 72, .25);
  transition: transform .2s ease, background .2s ease;
}
.cn-social a:hover, .cn-social a:focus-visible { transform: translateY(-3px); background: #f57450; color: #fff; outline: none; }

/* form card */
.cn-form-card {
  position: relative;
  padding: 1.8rem 1.7rem 1.9rem;
  border-radius: 26px;
  background: #fff;
  border: 1px solid #e4eae1;
  box-shadow: 0 20px 50px rgba(35, 78, 72, .16);
  overflow: hidden;
}
.cn-form-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, #f57450, #ffd0a8 55%, #3fb7a3); }
.cn-form-head { display: flex; align-items: center; gap: .95rem; margin-bottom: 1.4rem; }
.cn-form-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(135deg, #f57450, #e8431e); color: #fff; font-size: 1.2rem; box-shadow: 0 10px 22px rgba(245, 116, 80, .4); }
.cn-form-head h2 { margin: 0; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.6rem; color: #1c3b36; }
.cn-form-head p { margin: .15rem 0 0; font-size: .92rem; color: #6b7a74; }

/* restyle the existing form fields (markup unchanged) */
.cn-form-card .contact-form .form-group { margin-bottom: .9rem; }
.cn-form-card .contact-form label { display: block; margin: 0 0 .35rem; line-height: 1.3; font-size: .88rem; font-weight: 700; color: #1c3b36; }
.cn-form-card .contact-form label small { font-weight: 400; color: #7a8a84; }
.cn-form-card .contact-form input[type="text"],
.cn-form-card .contact-form input[type="email"],
.cn-form-card .contact-form select,
.cn-form-card .contact-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  font: inherit;
  line-height: 1.4;
  color: #1c3b36;
  background: #f3f6f1;
  border: 2px solid #dfe7dc;
  border-radius: 14px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.cn-form-card .contact-form textarea { resize: vertical; min-height: 130px; }
.cn-form-card .contact-form input:focus,
.cn-form-card .contact-form select:focus,
.cn-form-card .contact-form textarea:focus { outline: none; background: #fff; border-color: #f57450; box-shadow: 0 0 0 4px rgba(245, 116, 80, .18); }
.cn-form-card .contact-form .form-checkbox { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.3rem; }
.cn-form-card .contact-form .form-checkbox input { width: 20px; height: 20px; accent-color: #f57450; }
.cn-form-card .contact-form .form-checkbox label { margin: 0; font-weight: 600; }
.cn-form-card .contact-form .btn.btn-primary {
  width: 100%;
  padding: 1rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f57450, #e8431e);
  box-shadow: 0 12px 26px rgba(245, 116, 80, .42);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cn-form-card .contact-form .btn.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(245, 116, 80, .55); }
.cn-form-card .alert { border-radius: 14px; }

/* map */
.cn-map {
  position: relative;
  max-width: 1180px;
  margin: 1.2rem auto 0;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid #e4eae1;
  box-shadow: 0 16px 40px rgba(35, 78, 72, .14);
  line-height: 0;
}
.cn-map iframe { width: 100%; height: 400px; border: 0; display: block; }

/* prayer banner */
.cn-prayer { padding: 3.2rem 1.25rem; background: linear-gradient(135deg, #234e48 0%, #1b3d38 55%, #3a1f1a 130%); }
.cn-prayer-inner { display: flex; align-items: center; gap: 1.5rem; max-width: 1000px; margin: 0 auto; color: #fff; }
.cn-prayer-icon { flex-shrink: 0; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: linear-gradient(135deg, #f57450, #e8431e); font-size: 1.8rem; box-shadow: 0 12px 28px rgba(245, 116, 80, .4); }
.cn-prayer-text { flex: 1; }
.cn-prayer-text h2 { margin: 0 0 .3rem; font-family: var(--font-display, 'Playfair Display', serif); font-size: 1.8rem; color: #fff; }
.cn-prayer-text p { margin: 0; color: rgba(255, 255, 255, .8); line-height: 1.55; }
.cn-prayer-btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.6rem; border-radius: 999px; background: #fff; color: #234e48; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 12px 28px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.cn-prayer-btn:hover, .cn-prayer-btn:focus-visible { transform: translateY(-2px); color: #234e48; background: #fff3ec; outline: none; }
.cn-prayer-btn .fa-arrow-right { font-size: .75rem; }

/* ---------- dark theme ---------- */
html[data-theme="dark"] .cn-main { background: #121c1a; background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 28px 28px; }
html[data-theme="dark"] .cn-card,
html[data-theme="dark"] .cn-form-card,
html[data-theme="dark"] .cn-map { background: #1a2623; border-color: rgba(255, 255, 255, .1); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .cn-card, html[data-theme="dark"] .cn-card-text strong, html[data-theme="dark"] .cn-times li b,
html[data-theme="dark"] .cn-form-head h2, html[data-theme="dark"] .cn-form-card .contact-form label { color: #f1f6f3; }
html[data-theme="dark"] .cn-card-text > span, html[data-theme="dark"] .cn-times li span, html[data-theme="dark"] .cn-form-head p { color: #aebdb6; }
html[data-theme="dark"] .cn-card-text small { color: #8da099; }
html[data-theme="dark"] .cn-times li { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .cn-form-card .contact-form input[type="text"],
html[data-theme="dark"] .cn-form-card .contact-form input[type="email"],
html[data-theme="dark"] .cn-form-card .contact-form select,
html[data-theme="dark"] .cn-form-card .contact-form textarea { background: #121c1a; border-color: rgba(255, 255, 255, .14); color: #f1f6f3; }

/* ---------- animation ---------- */
@keyframes cn-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cn-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .5; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cn-grid { grid-template-columns: 1fr; max-width: 620px; top: -2.2rem; }
  .cn-form-card { order: -1; }
  .cn-prayer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .cn-hero { padding: 6.8rem 1.25rem 4.6rem; }
  .cn-main { padding: 0 1rem 2.6rem; }
  .cn-form-card { padding: 1.4rem 1.2rem 1.5rem; border-radius: 22px; }
  .cn-map iframe { height: 320px; }
  .cn-prayer-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cn-hero-inner, .cn-chip-dot { animation: none !important; }
  .cn-card, .cn-social a, .cn-prayer-btn { transition: none !important; }
}
