/*
Theme Name: GreatTogether
Theme URI: https://greattogether.com/
Author: Mawi Digital
Description: A warm, accessible and responsive theme for the GreatTogether family-building community.
Version: 1.0.15
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: greattogether-theme
*/

:root {
  --gt-cream: #f7fbf9;
  --gt-paper: #ffffff;
  --gt-coral: #e86f61;
  --gt-coral-dark: #c95048;
  --gt-blush: #f9ded8;
  --gt-peach: #f6b995;
  --gt-teal: #267c70;
  --gt-teal-dark: #1b5f57;
  --gt-mint: #e3f2ed;
  --gt-ink: #243230;
  --gt-muted: #657471;
  --gt-border: #e5e8e5;
  --gt-shadow: 0 14px 42px rgba(48, 66, 62, .09);
  --gt-radius: 22px;
  --gt-wrap: 1180px;
}

html { color-scheme: light; }
html[data-gt-theme="dark"] {
  color-scheme: dark;
  --gt-cream:#101816;
  --gt-paper:#182320;
  --gt-coral:#f08a7d;
  --gt-coral-dark:#f2a096;
  --gt-blush:#3a2725;
  --gt-peach:#f3bd9c;
  --gt-teal:#72c9b7;
  --gt-teal-dark:#a4dfd2;
  --gt-mint:#233a34;
  --gt-ink:#edf5f2;
  --gt-muted:#aec0bb;
  --gt-border:#344640;
  --gt-shadow:0 14px 42px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--gt-cream);
  color: var(--gt-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .gt-site-header { top: 32px; }
a { color: var(--gt-teal); text-underline-offset: 3px; }
a:hover { color: var(--gt-teal-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.screen-reader-text { position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.screen-reader-text:focus { position:fixed!important;top:8px;left:8px;width:auto;height:auto;padding:12px 16px;clip:auto;background:#fff;color:#000;z-index:100000; }
.gt-container { width: min(var(--gt-wrap), calc(100% - 48px)); margin-inline: auto; }

.gt-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 251, .94);
  border-bottom: 1px solid rgba(36, 50, 48, .08);
  backdrop-filter: blur(14px);
}
.gt-header-inner { min-height: 82px; display:flex; align-items:center; gap:20px; }
.gt-brand { display:flex; align-items:center; gap:12px; flex:0 0 auto; color:var(--gt-ink); text-decoration:none; font-weight:850; font-size:23px; letter-spacing:-.035em; }
.gt-brand-mark { width:66px; height:44px; display:inline-grid; place-items:center; flex:0 0 66px; }
.gt-brand-mark img { display:block; width:100%; height:100%; object-fit:contain; }
.gt-nav { margin-left:auto; display:flex; align-items:center; gap:18px; }
.gt-nav ul { display:flex; align-items:center; gap:18px; margin:0; padding:0; list-style:none; }
.gt-nav a { color:var(--gt-ink); text-decoration:none; font-size:15px; font-weight:650; }
.gt-nav a:hover,.gt-nav .current-menu-item>a { color:var(--gt-teal); }
.gt-header-actions { display:flex; align-items:center; gap:8px; }
.gt-theme-toggle { display:inline-grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:1px solid var(--gt-border); border-radius:12px; background:var(--gt-paper); color:var(--gt-teal-dark); cursor:pointer; }
.gt-theme-toggle:hover { background:var(--gt-mint); }
.gt-theme-toggle:focus-visible { outline:3px solid rgba(38,124,112,.28); outline-offset:3px; }
.gt-theme-toggle-icon { font-size:19px; line-height:1; }
.gt-theme-toggle-label { display:none; }
.gt-theme-toggle-settings { display:inline-flex; width:auto; min-width:150px; gap:9px; padding:0 16px; font-weight:800; }
.gt-theme-toggle-settings .gt-theme-toggle-label { display:inline; }
.gt-login { color:var(--gt-teal)!important; font-weight:750!important; }
.gt-member-nav{color:var(--gt-teal-dark)!important;font-size:14px;font-weight:750;text-decoration:none;white-space:nowrap}
.gt-account-menu { position:relative; }
.gt-account-menu summary { display:flex; align-items:center; gap:9px; min-height:44px; padding:0 14px; border:1px solid var(--gt-border); border-radius:12px; background:#fff; color:var(--gt-teal-dark); font-size:14px; font-weight:800; cursor:pointer; list-style:none; white-space:nowrap; }
.gt-account-menu summary::-webkit-details-marker { display:none; }
.gt-account-menu summary::after { content:""; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg) translateY(-2px); margin-left:2px; transition:.2s; }
.gt-account-menu[open] summary::after { transform:rotate(225deg) translate(-2px,-1px); }
.gt-account-icon { display:grid; place-items:center; width:25px; height:25px; border-radius:50%; background:var(--gt-mint); color:var(--gt-teal); font-size:9px; }
.gt-header-badge,.gt-menu-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#d86155;color:#fff;font-size:11px;font-weight:850;line-height:1}.gt-account-menu summary .gt-header-badge{margin-left:1px}.gt-account-panel a .gt-menu-badge{width:auto;margin-left:auto;color:#fff}.gt-mobile-actions a .gt-menu-badge{display:inline-grid;margin-left:7px;vertical-align:middle}.gt-account-panel a.gt-notification-link{color:var(--gt-teal-dark)}
.gt-account-panel { position:absolute; top:calc(100% + 10px); right:0; z-index:1100; width:245px; padding:9px; border:1px solid var(--gt-border); border-radius:16px; background:var(--gt-paper); box-shadow:0 18px 45px rgba(36,50,48,.16); }
.gt-account-panel a { display:flex; align-items:center; gap:11px; padding:10px 11px; border-radius:10px; color:var(--gt-ink); text-decoration:none; font-size:14px; font-weight:700; }
.gt-account-panel a:hover { background:var(--gt-mint); color:var(--gt-teal-dark); }
.gt-account-panel a span { display:grid; place-items:center; width:24px; color:var(--gt-teal); font-size:16px; }
.gt-account-panel .gt-account-signout { margin-top:6px; padding-top:11px; border-top:1px solid var(--gt-border); color:var(--gt-muted); }
.gt-join { display:inline-flex; min-height:44px; align-items:center; padding:0 18px; border-radius:12px; background:var(--gt-teal); color:#fff!important; box-shadow:0 8px 20px rgba(36,111,107,.18); }
.gt-join:hover { background:var(--gt-teal-dark); }
.gt-menu-toggle { display:none; margin-left:auto; width:46px; height:44px; border:0; border-radius:12px; background:var(--gt-mint); color:var(--gt-teal-dark); cursor:pointer; }
.gt-menu-toggle span,.gt-menu-toggle::before,.gt-menu-toggle::after { content:""; display:block; width:21px; height:2px; background:currentColor; margin:5px auto; transition:.2s; }
.gt-menu-toggle[aria-expanded="true"] span { opacity:0; }
.gt-menu-toggle[aria-expanded="true"]::before { transform:translateY(7px) rotate(45deg); }
.gt-menu-toggle[aria-expanded="true"]::after { transform:translateY(-7px) rotate(-45deg); }

.gt-main { min-height:60vh; }
.gt-content-shell { padding:64px 0 90px; }
.gt-content { max-width:840px; margin:auto; }
.gt-content-wide { max-width:1120px; }
.gt-app-page-shell { padding-top:28px; }
.gt-app-page .gt-shell { margin-top:0; padding-left:0; padding-right:0; }
.gt-page-header { margin-bottom:36px; }
.gt-page-header h1 { margin:0; font-size:clamp(40px,5vw,64px); line-height:1.06; letter-spacing:-.045em; }
.gt-page-header p { color:var(--gt-muted); font-size:19px; }
.entry-content>*:first-child { margin-top:0; }
.entry-content h2 { margin-top:2em; font-size:clamp(29px,3.2vw,42px); line-height:1.15; letter-spacing:-.025em; }
.entry-content h3 { margin-top:1.8em; font-size:25px; line-height:1.25; }
.entry-content p,.entry-content li { color:#4e5d5a; }
.entry-content blockquote { margin:34px 0; padding:26px 30px; background:var(--gt-blush); border:0; border-left:5px solid var(--gt-coral); border-radius:0 var(--gt-radius) var(--gt-radius) 0; }
.entry-content .alignwide { width:min(1100px,calc(100vw - 48px)); max-width:none; margin-left:50%; transform:translateX(-50%); }
.entry-content .alignfull { width:100vw; max-width:none; margin-left:50%; transform:translateX(-50%); }
body.home .gt-content-shell { padding:0; }
body.home .gt-content { max-width:none; }
body.home .gt-page-header { display:none; }

.gt-notice { padding:15px 18px; border-radius:14px; background:var(--gt-mint); color:var(--gt-teal-dark); }
.gt-card-shell,.gt-account-shell,.gt-profile-shell { background:var(--gt-paper); border:1px solid var(--gt-border); border-radius:var(--gt-radius); padding:clamp(24px,4vw,42px); box-shadow:var(--gt-shadow); }

/* GreatTogether Core plugin compatibility */
.gt-form,.greattogether-form,.gt-account,.gt-profile { max-width:760px; margin-inline:auto; }
.gt-form label,.greattogether-form label { display:block; margin:20px 0 7px; color:var(--gt-ink); font-weight:750; }
.gt-form input:not([type=checkbox]):not([type=radio]),.gt-form select,.gt-form textarea,
.greattogether-form input:not([type=checkbox]):not([type=radio]),.greattogether-form select,.greattogether-form textarea {
  width:100%; min-height:50px; padding:12px 14px; color:var(--gt-ink); background:#fff; border:1px solid #ccd7d3; border-radius:12px; outline:none;
}
.gt-form textarea,.greattogether-form textarea { min-height:140px; resize:vertical; }
.gt-form input:focus,.gt-form select:focus,.gt-form textarea:focus,.greattogether-form input:focus,.greattogether-form select:focus,.greattogether-form textarea:focus { border-color:var(--gt-teal); box-shadow:0 0 0 4px rgba(36,111,107,.12); }
.gt-form button,.gt-form input[type=submit],.greattogether-form button,.greattogether-form input[type=submit],.gt-button,.button {
  display:inline-flex; align-items:center; justify-content:center; min-height:50px; padding:0 22px; border:0; border-radius:12px; background:var(--gt-teal); color:#fff; font-weight:800; text-decoration:none; cursor:pointer;
}
.gt-form button:hover,.greattogether-form button:hover,.gt-button:hover { background:var(--gt-teal-dark); color:#fff; }
.gt-profile-grid,.gt-member-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.gt-profile-card,.gt-member-card { overflow:hidden; background:#fff; border:1px solid var(--gt-border); border-radius:20px; box-shadow:0 10px 28px rgba(48,66,62,.07); }
.gt-profile-card img,.gt-member-card img { width:100%; aspect-ratio:4/3; object-fit:cover; }
.gt-profile-card-content,.gt-member-card-content { padding:20px; }
.gt-tabs { display:flex; gap:8px; overflow-x:auto; margin-bottom:28px; padding-bottom:4px; }
.gt-tabs a { white-space:nowrap; padding:10px 15px; border-radius:10px; background:var(--gt-mint); text-decoration:none; font-weight:700; }

.gt-site-footer { background:var(--gt-ink); color:#d8e3e0; }
.gt-footer-main { display:grid; grid-template-columns:1.35fr .75fr .9fr; gap:55px; padding:68px 0 50px; }
.gt-footer-brand { color:#fff; margin-bottom:18px; }
.gt-footer-brand .gt-brand-mark { width:76px; height:52px; flex-basis:76px; }
.gt-footer-copy { max-width:460px; color:#b9c8c5; }
.gt-footer-title { margin:5px 0 16px; color:#fff; font-size:15px; text-transform:uppercase; letter-spacing:.08em; }
.gt-footer-links { list-style:none; margin:0; padding:0; display:grid; gap:9px; }
.gt-footer-links a { color:#d8e3e0; text-decoration:none; }
.gt-footer-links a:hover { color:var(--gt-peach); }
.gt-footer-bottom { display:flex; justify-content:space-between; gap:25px; padding:22px 0 30px; border-top:1px solid rgba(255,255,255,.12); color:#aebdb9; font-size:14px; }
.gt-footer-bottom a { color:#d8e3e0; }

@media (max-width: 1160px) {
  body.admin-bar .gt-site-header { top:46px; }
  .gt-container { width:min(100% - 36px,var(--gt-wrap)); }
  .gt-menu-toggle { display:block; }
  .gt-nav { display:none; position:absolute; left:18px; right:18px; top:72px; padding:20px; background:var(--gt-paper); border:1px solid var(--gt-border); border-radius:18px; box-shadow:var(--gt-shadow); }
  .gt-nav.is-open { display:block; }
  .gt-nav ul { display:grid; gap:4px; }
  .gt-nav a { display:block; padding:11px 10px; border-radius:9px; }
  .gt-header-actions { display:none; }
  .gt-nav .gt-mobile-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
  .gt-nav .gt-mobile-actions a { text-align:center; }
  .gt-mobile-account-title { grid-column:1/-1; padding:12px 10px 3px; border-top:1px solid var(--gt-border); color:var(--gt-muted); font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
  .gt-profile-grid,.gt-member-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gt-footer-main { grid-template-columns:1.4fr 1fr; }
}
@media (min-width:1161px) { .gt-mobile-actions { display:none!important; } }
@media (max-width: 640px) {
  body.admin-bar .gt-site-header { top:0; }
  .gt-container { width:calc(100% - 28px); }
  .gt-header-inner { min-height:70px; }
  .gt-brand { font-size:21px; }
  .gt-brand-mark { transform:scale(.9); transform-origin:left center; }
  .gt-nav { top:62px; left:14px; right:14px; }
  .gt-content-shell { padding:44px 0 64px; }
  .gt-page-header h1 { font-size:40px; }
  .gt-profile-grid,.gt-member-grid { grid-template-columns:1fr; }
  .gt-footer-main { grid-template-columns:1fr; gap:34px; padding:50px 0 36px; }
  .gt-footer-bottom { display:grid; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }

/* Shared action hierarchy: teal acts, mint supports, red warns. */
.gt-button-secondary { border:1px solid #bcd8cf; background:var(--gt-mint); color:var(--gt-teal-dark)!important; box-shadow:none; }
.gt-button-secondary:hover { border-color:#95c1b4; background:#d4eae3; color:var(--gt-teal-dark)!important; }
.gt-button-muted { border:1px solid #cddbd6; background:#fff; color:#526763!important; box-shadow:none; }
.gt-button-muted:hover { border-color:#aabdb7; background:#f1f6f4; color:var(--gt-ink)!important; }
.gt-button-danger { border:1px solid #e3b9b5; background:#fff0ef; color:#a33d38!important; box-shadow:none; }
.gt-button-danger:hover { border-color:#cf8e88; background:#fbe1df; color:#842f2b!important; }
.gt-button:focus-visible,.gt-join:focus-visible,.gt-account-menu summary:focus-visible { outline:3px solid rgba(38,124,112,.28); outline-offset:3px; }

/* Warm dark mode */
html[data-gt-theme="dark"] .gt-site-header { background:rgba(16,24,22,.94); border-bottom-color:rgba(224,240,234,.1); }
html[data-gt-theme="dark"] .gt-account-menu summary,
html[data-gt-theme="dark"] .gt-form input:not([type=checkbox]):not([type=radio]),
html[data-gt-theme="dark"] .gt-form select,
html[data-gt-theme="dark"] .gt-form textarea,
html[data-gt-theme="dark"] .greattogether-form input:not([type=checkbox]):not([type=radio]),
html[data-gt-theme="dark"] .greattogether-form select,
html[data-gt-theme="dark"] .greattogether-form textarea,
html[data-gt-theme="dark"] .gt-profile-card,
html[data-gt-theme="dark"] .gt-member-card { background:var(--gt-paper); border-color:var(--gt-border); color:var(--gt-ink); }
html[data-gt-theme="dark"] .entry-content p,
html[data-gt-theme="dark"] .entry-content li { color:#c4d1cd; }
html[data-gt-theme="dark"] .gt-button-muted { border-color:var(--gt-border); background:#1d2b27; color:#c7d6d1!important; }
html[data-gt-theme="dark"] .gt-button-muted:hover { background:#263a34; color:var(--gt-ink)!important; }
html[data-gt-theme="dark"] .gt-site-footer { background:#0b1110; }
html[data-gt-theme="dark"] .screen-reader-text:focus { background:var(--gt-paper); color:var(--gt-ink); }

/* Core plugin surfaces use the same dark palette. */
html[data-gt-theme="dark"] { --gt-primary:#72c9b7; --gt-primary-dark:#a4dfd2; --gt-primary-soft:#233a34; --gt-line:#344640; --gt-danger:#ffaaa2; --gt-danger-soft:#3b2524; }
html[data-gt-theme="dark"] .gt-shell { color:var(--gt-ink); }
html[data-gt-theme="dark"] .gt-card,
html[data-gt-theme="dark"] .gt-member-card,
html[data-gt-theme="dark"] .gt-dashboard-stats a,
html[data-gt-theme="dark"] .gt-autosave-status,
html[data-gt-theme="dark"] .gt-filter-bar input,
html[data-gt-theme="dark"] .gt-filter-bar select,
html[data-gt-theme="dark"] .gt-form input:not([type=checkbox]):not([type=file]),
html[data-gt-theme="dark"] .gt-form select,
html[data-gt-theme="dark"] .gt-form textarea,
html[data-gt-theme="dark"] .gt-contact-form textarea { background:#182320; border-color:#344640; color:#edf5f2; }
html[data-gt-theme="dark"] .gt-member-visual,
html[data-gt-theme="dark"] .gt-match-meter-card,
html[data-gt-theme="dark"] .gt-match-meter-profile,
html[data-gt-theme="dark"] .gt-profile-facts,
html[data-gt-theme="dark"] .gt-verification-steps article { background:#1d2b27; }
html[data-gt-theme="dark"] .gt-message.is-theirs { background:#24312e; }
html[data-gt-theme="dark"] .gt-message.is-mine { background:#214238; }
html[data-gt-theme="dark"] .gt-dashboard-hero,
html[data-gt-theme="dark"] .gt-verification-hero { background:linear-gradient(135deg,#342622,#1d332e); }
html[data-gt-theme="dark"] .gt-choice span { border-color:#455953; }
html[data-gt-theme="dark"] .gt-choice input:checked+span,
html[data-gt-theme="dark"] .gt-compatibility-chips span,
html[data-gt-theme="dark"] .gt-match-explanation li { background:#234139; color:#b9ebdf; }
html[data-gt-theme="dark"] .gt-notice { background:#24352f; color:#d9e9e4; }
html[data-gt-theme="dark"] .gt-error { background:#3b2524; }
html[data-gt-theme="dark"] .gt-success { background:#20392c; }
html[data-gt-theme="dark"] .gt-profile-gallery>.gt-member-initial,
html[data-gt-theme="dark"] .gt-empty-icon { background:#233a34; }

/* Page-builder homepage: replace its self-contained light palette. */
html[data-gt-theme="dark"] .gt-home {
  --cream:#101816;
  --paper:#182320;
  --coral:#f08a7d;
  --coral-dark:#f2a096;
  --blush:#3a2725;
  --peach:#f3bd9c;
  --teal:#72c9b7;
  --mint:#233a34;
  --ink:#edf5f2;
  --muted:#aec0bb;
  background:#101816;
  color:#edf5f2;
}
html[data-gt-theme="dark"] .gt-home .gt-hero { background:linear-gradient(135deg,#251d1a 0%,#352523 47%,#19312b 100%); }
html[data-gt-theme="dark"] .gt-home .gt-hero:before { background:#6b4135; opacity:.42; }
html[data-gt-theme="dark"] .gt-home .gt-hero:after { background:#2b6255; opacity:.42; }
html[data-gt-theme="dark"] .gt-home .gt-kicker,
html[data-gt-theme="dark"] .gt-home .gt-btn-secondary,
html[data-gt-theme="dark"] .gt-home .gt-hero-card { background:rgba(24,35,32,.9); border-color:#3a4b46; color:#a4dfd2!important; }
html[data-gt-theme="dark"] .gt-home .gt-mini div { background:#121d1a; }
html[data-gt-theme="dark"] .gt-home .gt-lead,
html[data-gt-theme="dark"] .gt-home .gt-trustline,
html[data-gt-theme="dark"] .gt-home .gt-card p,
html[data-gt-theme="dark"] .gt-home .gt-final p,
html[data-gt-theme="dark"] .gt-home .gt-note { color:#b7c8c3; }
html[data-gt-theme="dark"] .gt-home .gt-card { border:1px solid #394a45; box-shadow:0 12px 38px rgba(0,0,0,.2); }
html[data-gt-theme="dark"] .gt-home .gt-card:nth-child(1) { background:#352523; }
html[data-gt-theme="dark"] .gt-home .gt-card:nth-child(2) { background:#1c342e; }
html[data-gt-theme="dark"] .gt-home .gt-card:nth-child(3) { background:#352f20; }
html[data-gt-theme="dark"] .gt-home .gt-steps { background:#173f39; }
html[data-gt-theme="dark"] .gt-home .gt-quote { background:linear-gradient(145deg,#392624,#342d23); }
html[data-gt-theme="dark"] .gt-home .gt-pro { background:#151f1c; }
html[data-gt-theme="dark"] .gt-home .gt-probox { background:#182320; border:1px solid #344640; box-shadow:0 14px 45px rgba(0,0,0,.24); }
html[data-gt-theme="dark"] .gt-home .gt-final { background:linear-gradient(115deg,#4a3028,#3b2928 50%,#20443b); }

/* Communities, language preferences and country-specific legal resources. */
html[data-gt-theme="dark"] .gt-community-panel,
html[data-gt-theme="dark"] .gt-community-account-card,
html[data-gt-theme="dark"] .gt-legal-card { background:#182320; border-color:#344640; color:#edf5f2; box-shadow:0 12px 34px rgba(0,0,0,.24); }
html[data-gt-theme="dark"] .gt-community-form input,
html[data-gt-theme="dark"] .gt-community-form select,
html[data-gt-theme="dark"] .gt-community-fields input,
html[data-gt-theme="dark"] .gt-community-fields select,
html[data-gt-theme="dark"] .gt-language-switcher select { background:#111b18; border-color:#455953; color:#edf5f2; }
html[data-gt-theme="dark"] .gt-community-fields { border-color:#344640; }
html[data-gt-theme="dark"] .gt-field-help,
html[data-gt-theme="dark"] .gt-legal-meta { color:#aec0bb; }
html[data-gt-theme="dark"] .gt-community-success,
html[data-gt-theme="dark"] .gt-legal-badge { background:#234139; color:#b9ebdf; }
html[data-gt-theme="dark"] .gt-legal-warning { background:#352f20; color:#e9dcc2; }
