/*
Theme Name: Trust Advice
Theme URI: https://trustadvice.org.uk
Description: Clean WordPress theme for Trust Advice — rebuilt from the approved static HTML designs.
Version: 1.2
Author: Trust Advice Limited
Text Domain: trustadvice
*/

:root {
  --navy: #0b4867;
  --navy-deep: #083650;
  --navy-pale: #e8f1f6;
  --teal: #699998;
  --teal-light: #85aeae;
  --teal-pale: #eef4f4;
  --gold: #c9aa66;
  --gold-dark: #b8943a;
  --gold-light: #e2c07a;
  --gold-pale: #fdf6e7;
  --charcoal: #1a2a35;
  --mid: #3d5a68;
  --soft: #7a9aaa;
  --white: #ffffff;
  --off-white: #f7fafc;
  --light: #f7f8fc;
  --border: #cddde6;
  --text: #2d3748;
  --text-muted: #5a6a7a;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
body.admin-bar .ta-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .ta-header { top: 46px; } }

/* WooCommerce baseline: avoid aggressive resets on checkout/account */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce select,
.woocommerce input,
.woocommerce button,
.woocommerce textarea { font-family: var(--font-body); }

/* Header / Nav */
.ta-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--border); padding: 0 40px; height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ta-header-logo a { display: flex; align-items: center; text-decoration: none; }
.ta-header-logo img { height: 76px; width: auto; display: block; }
.ta-nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ta-nav a { font-size: 14px; font-weight: 500; color: var(--mid); text-decoration: none; padding: 6px 12px; border-radius: 6px; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.ta-nav a:hover, .ta-nav a.active { color: var(--navy); background: var(--navy-pale); }
.ta-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ta-login-link { font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; transition: color 0.15s; border: 1px solid var(--border); padding: 7px 16px; border-radius: 7px; }
.ta-login-link:hover { color: var(--white); background: var(--navy); border-color: var(--navy); }
.ta-header-cta { background: var(--gold); color: var(--navy-deep); font-size: 13px; font-weight: 700; padding: 8px 18px; border-radius: 7px; text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.ta-header-cta:hover { background: var(--gold-dark); color: var(--white); }
.ta-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.ta-burger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.2s; }
.ta-mobile-nav { display: none; position: fixed; top: 96px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 24px 24px; z-index: 99; box-shadow: 0 8px 24px rgba(11,72,103,0.1); }
body.admin-bar .ta-mobile-nav { top: 128px; }
.ta-mobile-nav.open { display: block; }
.ta-mobile-nav a { display: block; font-size: 15px; font-weight: 500; color: var(--mid); text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--border); }
.ta-mobile-nav a:last-child { border-bottom: none; }
.ta-mobile-nav a.active { color: var(--navy); font-weight: 600; }
.ta-mobile-cta { display: block; margin-top: 16px; background: var(--gold); color: var(--navy-deep); text-align: center; padding: 12px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }

/* Footer */
.ta-footer { background: var(--charcoal); padding: 3rem 40px; border-top: 3px solid var(--teal); color: rgba(255,255,255,0.55); }
.ta-footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.ta-footer-wordmark { display: block; font-size: 16px; font-weight: 600; color: #8a9eaa; margin-bottom: 12px; }
.ta-footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.5); line-height: 1.75; max-width: 280px; }
.ta-footer-col-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal-light); margin-bottom: 1rem; }
.ta-footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin: 0; padding: 0; }
.ta-footer-links a { font-size: 0.92rem; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.ta-footer-links a:hover { color: var(--teal-light); }
.ta-footer-contact-item { font-size: 0.92rem; color: rgba(255,255,255,0.55); margin-bottom: 0.5rem; line-height: 1.6; }
.ta-footer-contact-item strong { display: block; color: rgba(255,255,255,0.85); font-weight: 500; }
.ta-footer-contact-item a { color: rgba(255,255,255,0.55); text-decoration: none; }
.ta-footer-bottom { max-width: 1100px; margin: 2rem auto 0; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.ta-footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.35); margin: 0; }

@media (max-width: 900px) {
  .ta-nav, .ta-header-actions { display: none; }
  .ta-burger { display: flex; }
  .ta-header { padding: 0 20px; }
  .ta-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .ta-footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) { .ta-footer { padding: 48px 20px 28px; } }
/**
 * Trust Advice — My Account styles
 *
 * Add to your theme's style.css, or enqueue as a separate file.
 * Uses the same CSS variables as the main theme.
 *
 * Variables assumed:
 *   --navy:        #1a3a5c  (or your navy)
 *   --teal:        #2a7f7f  (or your teal)
 *   --gold:        #c8a45a  (or your gold)
 *   --text:        #2c2c2c
 *   --text-muted:  #666
 *   --border:      #e0e0e0
 *   --white:       #ffffff
 */


/* ── Shared wrapper ─────────────────────────────────────────────────────── */

.ta-dashboard,
.ta-membership {
    font-family: var(--font-body, Georgia, serif);
    color: var(--text, #2c2c2c);
    max-width: 820px;
}


/* ── Left nav ────────────────────────────────────────────────────────────── */

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 4px;
    color: var(--navy, #1a3a5c);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s;
}

.woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-MyAccount-navigation ul li.is-active a {
    color: var(--teal, #2a7f7f);
}

/* Policy & Template Library link — gold + bold */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--ta-library a {
    color: var(--gold, #c8a45a);
    font-weight: 700;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--ta-library a:hover {
    color: var(--navy, #1a3a5c);
}


/* ── Dashboard ───────────────────────────────────────────────────────────── */

.ta-dashboard__title {
    font-size: 1.6rem;
    color: var(--navy, #1a3a5c);
    margin: 0 0 1.2rem;
    font-weight: 700;
}

.ta-dashboard__welcome {
    background: #f7f9fc;
    border: 1px solid var(--border, #e0e0e0);
    border-left: 4px solid var(--teal, #2a7f7f);
    border-radius: 6px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
}

.ta-dashboard__welcome > p {
    margin: 0 0 1rem;
    font-size: 1rem;
    line-height: 1.65;
}

.ta-dashboard__guide {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
}

.ta-dashboard__guide li {
    padding: 6px 0 6px 1.4rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.55;
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.ta-dashboard__guide li:last-child {
    border-bottom: none;
}

.ta-dashboard__guide li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--teal, #2a7f7f);
    font-weight: 700;
}

.ta-dashboard__helpline {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1.2rem;
    background: var(--navy, #1a3a5c);
    color: #fff;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.ta-dashboard__helpline-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: 2px;
}

.ta-dashboard__helpline a {
    color: var(--gold, #c8a45a);
    text-decoration: none;
}

.ta-dashboard__helpline a:hover {
    text-decoration: underline;
}

.ta-dashboard__helpline-hours {
    font-size: 0.85rem;
    opacity: 0.75;
}


/* ── My Membership ───────────────────────────────────────────────────────── */

.ta-membership__title {
    font-size: 1.6rem;
    color: var(--navy, #1a3a5c);
    margin: 0 0 1rem;
    font-weight: 700;
}

.ta-membership__intro {
    background: #f7f9fc;
    border: 1px solid var(--border, #e0e0e0);
    border-left: 4px solid var(--teal, #2a7f7f);
    border-radius: 6px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.8rem;
}

.ta-membership__intro > p {
    margin: 0 0 1rem;
    font-size: 0.97rem;
    line-height: 1.65;
}

/* Benefits grid */
.ta-membership__benefits {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ta-membership__benefits-col {
    flex: 1;
    min-width: 220px;
}

.ta-membership__benefits-col h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #666);
    margin: 0 0 0.6rem;
    font-weight: 600;
}

.ta-membership__benefits-col--insight h3 {
    color: var(--teal, #2a7f7f);
}

.ta-membership__benefits-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ta-membership__benefits-col ul li {
    padding: 5px 0 5px 1.4rem;
    position: relative;
    font-size: 0.92rem;
    line-height: 1.5;
    border-bottom: 1px solid var(--border, #e0e0e0);
}

.ta-membership__benefits-col ul li:last-child {
    border-bottom: none;
}

.ta-membership__benefits-col ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--teal, #2a7f7f);
    font-weight: 700;
}

.ta-membership__benefits-col--insight ul li::before {
    color: var(--gold, #c8a45a);
}

/* Action buttons row */
.ta-membership__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.ta-btn-cancel {
    background: #fff !important;
    color: #c0392b !important;
    border: 1px solid #c0392b !important;
}

.ta-btn-cancel:hover {
    background: #c0392b !important;
    color: #fff !important;
}

.ta-btn-payment {
    background: var(--navy, #1a3a5c) !important;
    color: #fff !important;
    border: none !important;
}

.ta-btn-payment:hover {
    background: var(--teal, #2a7f7f) !important;
}

/* Cancel locked message */
.ta-membership__cancel-locked {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    border: 1px dashed var(--border, #e0e0e0);
    padding: 8px 14px;
    border-radius: 4px;
}

.ta-membership__cancel-locked small {
    display: block;
    margin-top: 2px;
    opacity: 0.75;
}

/* Payment method notice */
.ta-membership__payment-notice {
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin: 1rem 0 1.5rem;
}

.ta-membership__payment-notice--annual {
    background: #fdf8ec;
    border: 1px solid #e8d5a0;
    color: #6b5a2a;
}

.ta-membership__payment-notice--monthly {
    background: #edf6f6;
    border: 1px solid #a0cece;
    color: #2a5a5a;
}

.ta-membership__payment-notice a {
    color: inherit;
    font-weight: 600;
}


/* ── Responsive ──────────────────────────────────────────────────────────── */

@media ( max-width: 640px ) {
    .ta-membership__benefits {
        flex-direction: column;
    }
    .ta-membership__actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Cancel locked notice */
.ta-cancel-locked {
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    border: 1px dashed var(--border, #cddde6);
    padding: 8px 14px;
    border-radius: 4px;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Membership intro box */
.ta-membership-intro { margin-bottom: 1.5rem; }

/* Smooth scroll for anchor links */
html { scroll-behavior: smooth; }
/* Offset for fixed header when scrolling to anchor */
#join { scroll-margin-top: 100px; }
