/* === Variables === */
:root {
  --navy: #005BAA;
  --navy-dark: #004282;
  --blue: #2CC1EC;
  --blue-light: #BDEDFB;
  --blue-tint: #E5F7FD;
  --gold: #FFCC4E;
  --lemon: #FDE981;
  --green: #27ae60;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #6c757d;
  --gray-700: #495057;
  --gray-900: #212529;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --max-width: 1140px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--gray-900); background: var(--white); padding-top: 1.85rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; color: var(--navy); }
h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
blockquote { border-left: 4px solid var(--gold); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--gray-100); font-style: italic; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* === Buttons === */
.btn { display: inline-block; padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: all 0.2s; text-align: center; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,91,170,0.3); }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.1rem; }

/* === Fixed Top Bar === */
.header-top { background: var(--navy-dark); color: var(--white); font-size: 0.78rem; padding: 0.35rem 0; position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 1rem; }
.header-notice { white-space: nowrap; font-size: 0.7rem; color: rgba(255,255,255,0.5); flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.header-top a { color: rgba(255,255,255,0.7); }
.header-top a:hover { color: var(--white); }
.header-top-rates { display: flex; gap: 1rem; align-items: center; white-space: nowrap; flex-shrink: 0; }
.header-top-rates span { color: rgba(255,255,255,0.6); font-size: 0.72rem; letter-spacing: 0.02em; }
.header-top-rates strong { color: var(--gold); font-weight: 700; }
.header-top-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; white-space: nowrap; }
.header-top-phone { font-weight: 600; color: var(--white) !important; letter-spacing: 0.02em; white-space: nowrap; }
.header-top-phone:hover { color: var(--gold) !important; }
.header-top-cta { background: var(--gold); color: var(--navy-dark) !important; padding: 0.2rem 0.75rem; border-radius: 4px; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; white-space: nowrap; transition: all 0.15s; }
.header-top-cta:hover { background: var(--white); color: var(--navy-dark) !important; }
.lang-switch a { background: rgba(255,255,255,0.1); padding: 0.15rem 0.55rem; border-radius: 3px; font-weight: 500; font-size: 0.72rem; white-space: nowrap; }
/* Rates info tooltip */
.rates-info-trigger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; background: rgba(255,255,255,0.2); border-radius: 50%; font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.8) !important; cursor: pointer; vertical-align: middle; line-height: 1; }
.rates-info-trigger:hover, .rates-info-trigger:focus { background: rgba(255,255,255,0.35); color: var(--white) !important; }
.rates-info-trigger::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 40px; height: 12px; }
.rates-info-tooltip { display: none; position: absolute; top: calc(100% + 10px); right: -60px; width: 300px; background: var(--white); color: var(--gray-700) !important; font-size: 0.75rem; font-weight: 400; line-height: 1.45; padding: 0.75rem 0.85rem; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.18); z-index: 1001; white-space: normal; letter-spacing: 0; }
.rates-info-tooltip, .rates-info-tooltip span { color: var(--gray-700) !important; font-size: 0.75rem !important; }
.rates-info-tooltip strong, .rates-info-tooltip strong span { color: var(--navy) !important; font-size: 0.75rem !important; display: inline !important; margin-bottom: 0; }
.rates-info-tooltip .tooltip-cta { display: block; margin-top: 0.5rem; padding: 0.3rem 0.75rem; background: var(--navy); color: var(--white) !important; font-size: 0.7rem !important; font-weight: 600; border-radius: 4px; text-decoration: none; transition: background 0.15s; text-align: center; }
.rates-info-tooltip .tooltip-cta:hover { background: var(--navy-dark); color: var(--white) !important; }
.rates-info-trigger:hover .rates-info-tooltip,
.rates-info-trigger:focus .rates-info-tooltip,
.rates-info-trigger:focus-within .rates-info-tooltip { display: block; }

/* === Header Main === */
.header-main { background: var(--white); padding: 0.5rem 0; border-bottom: 1px solid var(--gray-200); }
.header-main .container { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.header-brand { flex-shrink: 0; }
.brokerage-name { font-weight: 600; color: var(--navy); font-size: 0.82rem; }
.brokerage-licence { font-size: 0.68rem; color: var(--gray-500); margin-left: 0.5rem; }
.header-agent { display: flex; align-items: center; gap: 1.25rem; }
.agent-name { font-family: var(--font-heading); font-size: 1.05rem; color: var(--navy); margin-bottom: 0; white-space: nowrap; }
.agent-title { display: none; }
.agent-licence { font-size: 0.68rem; color: var(--gray-500); white-space: nowrap; }
.agent-contact { font-size: 0.8rem; white-space: nowrap; }
.agent-contact a { margin-left: 0.75rem; color: var(--navy); font-weight: 500; }
.agent-contact a:hover { color: var(--blue); }

/* === Nav === */
.header-nav { background: var(--navy); position: sticky; top: 1.85rem; z-index: 100; }
.header-nav .container { display: flex; align-items: center; }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.1rem; padding: 0.75rem 0; cursor: pointer; }
.nav-links { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links li a { display: block; padding: 0.75rem 0.9rem; color: rgba(255,255,255,0.85); font-size: 0.85rem; font-weight: 500; transition: all 0.15s; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav-links li a:hover { color: var(--white); background: rgba(255,255,255,0.08); border-bottom-color: var(--gold); }
.nav-cta a { background: var(--gold) !important; color: var(--navy-dark) !important; font-weight: 700; border-radius: var(--radius); margin: 0.35rem 0 0.35rem 0.75rem; padding: 0.6rem 1.25rem !important; border-bottom: none !important; font-size: 0.85rem; }
.nav-cta a:hover { background: var(--lemon) !important; transform: translateY(-1px); }

/* === Hero === */
.hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, #0074d9 100%); color: var(--white); padding: 4.5rem 0 4rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%; background: radial-gradient(ellipse, rgba(44,193,236,0.15) 0%, transparent 70%); pointer-events: none; }
.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 1.5rem; max-width: 700px; margin-left: auto; margin-right: auto; position: relative; }
.hero-phone { margin-bottom: 0.5rem; position: relative; }
.hero-phone a { color: var(--gold); font-size: 1.15rem; font-weight: 600; }
.hero .btn-primary { background: var(--gold); color: var(--navy-dark); font-weight: 700; position: relative; }
.hero .btn-primary:hover { background: var(--white); color: var(--navy-dark); }

/* === Why Section === */
.why-section { padding: 4rem 0; background: var(--off-white); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.why-card { background: var(--white); padding: 2rem 1.75rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; border-top: 3px solid var(--gold); transition: transform 0.2s, box-shadow 0.2s; }
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.why-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.why-card h3 { color: var(--navy); font-size: 1.15rem; }

/* === Google Reviews (Business Listing Style) === */
.google-reviews-section { padding: 3.5rem 0; background: var(--white); }
.google-reviews-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.google-reviews-summary { display: flex; align-items: center; gap: 0.75rem; }
.google-g-logo { flex-shrink: 0; }
.google-reviews-meta h2 { font-size: 1.1rem; margin: 0; font-family: var(--font-body); font-weight: 600; color: var(--gray-700); }
.google-reviews-rating { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.15rem; }
.google-stars-display { color: #fbbc04; font-size: 0.95rem; letter-spacing: -1px; }
.google-rating-text { font-size: 0.85rem; color: var(--gray-500); }
.google-reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.google-review-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 1.25rem; transition: box-shadow 0.15s; }
.google-review-card:hover { box-shadow: 0 1px 6px rgba(0,0,0,0.1); }
.google-review-author { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.google-review-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.google-review-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; font-weight: 600; flex-shrink: 0; }
.google-review-author-info { display: flex; flex-direction: column; min-width: 0; }
.google-review-name { font-size: 0.9rem; font-weight: 500; color: var(--gray-700); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.google-review-name:hover { text-decoration: underline; }
.google-review-meta-line { font-size: 0.75rem; color: var(--gray-500); }
.google-review-stars { margin-bottom: 0.5rem; }
.google-star { font-size: 0.85rem; color: #dadce0; }
.google-star.filled { color: #fbbc04; }
.google-review-text { font-size: 0.875rem; line-height: 1.5; color: var(--gray-700); margin: 0; }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* === CTA Section === */
.cta-section { padding: 3rem 0; background: var(--navy); text-align: center; }
.cta-card p { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-top: 1rem; }
.cta-section .btn-primary { background: var(--gold); color: var(--navy-dark); }
.cta-section .btn-primary:hover { background: var(--white); color: var(--navy-dark); }

/* === Consultation === */
.consultation-section { padding: 4rem 0; background: var(--blue-tint); }
.consultation-section h2 { max-width: 700px; }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.check-list li { padding: 0.4rem 0; font-size: 1.05rem; }

/* === Calculator === */
.calculator-section { padding: 4rem 0; }
.calculator-widget { background: var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 2rem; max-width: 600px; margin: 0 auto; box-shadow: var(--shadow); }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.calc-group { display: flex; flex-direction: column; }
.calc-group label { font-size: 0.85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.25rem; }
.calc-group input, .calc-group select { padding: 0.6rem; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 1rem; }
.calc-form .btn { grid-column: 1 / -1; }
.calc-result { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; padding: 1.25rem; background: var(--navy); border-radius: var(--radius); }
.calc-label { color: rgba(255,255,255,0.8); font-weight: 500; }
.calc-payment { color: var(--gold); font-size: 2rem; font-weight: 700; font-family: var(--font-heading); }

/* === FAQ === */
.faq-section-home { padding: 4rem 0; background: var(--off-white); }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 1.25rem 0; background: none; border: none; cursor: pointer; font-size: 1rem; font-weight: 600; color: var(--navy); text-align: left; font-family: var(--font-body); }
.faq-question:hover { color: var(--blue); }
.faq-question span { color: inherit; }
.faq-icon { font-size: 1.5rem; color: var(--navy); transition: transform 0.2s; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.is-open .faq-answer { max-height: 500px; }
.faq-item.is-open .faq-icon { transform: rotate(45deg); }
.faq-answer p { padding: 0 0 1.25rem 0; color: var(--gray-700); }
.faq-answer a { color: var(--blue); text-decoration: underline; }
.faq-answer a:hover { color: var(--navy); }
.faq-google-review { margin-top: 0.25rem; padding: 1rem 1.25rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; }
.faq-review-author { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.4rem; }
.faq-review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.faq-review-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.faq-review-author-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.faq-review-name { font-size: 0.85rem; font-weight: 500; color: var(--gray-700); }
.faq-review-meta { font-size: 0.72rem; color: var(--gray-500); }
.faq-review-g { flex-shrink: 0; }
.faq-review-stars { margin-bottom: 0.35rem; }
.faq-review-text { font-size: 0.85rem; line-height: 1.5; color: var(--gray-700); margin: 0; }

/* === Lenders === */
.lenders-section { padding: 3rem 0; text-align: center; }
.lender-tabs { display: flex; justify-content: center; gap: 0.5rem; margin: 1.5rem 0 2rem; }
.lender-tab { padding: 0.5rem 1.25rem; border: 1px solid var(--gray-200); border-radius: 50px; background: var(--white); font-size: 0.85rem; font-weight: 500; color: var(--gray-700); cursor: pointer; transition: all 0.2s; font-family: var(--font-body); }
.lender-tab:hover { border-color: var(--navy); color: var(--navy); }
.lender-tab.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.lender-panel { display: none; justify-content: center; align-items: center; gap: 3rem; min-height: 80px; }
.lender-panel.is-active { display: flex; }
.lender-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; filter: grayscale(100%); opacity: 0.5; transition: filter 0.6s, opacity 0.6s; }
.lender-logo:hover, .lender-logo.is-highlighted { filter: none; opacity: 1; }

/* === Towns === */
.towns-section { padding: 4rem 0; text-align: center; }
.towns-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }
.town-link { background: var(--white); border: 1px solid var(--gray-200); padding: 0.5rem 1.25rem; border-radius: 50px; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; color: var(--navy); }
.town-link:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* === Online Advice === */
.online-advice { padding: 4rem 0; }
.online-advice h2 { margin-bottom: 1.5rem; }

/* === Content Pages === */
.page-banner { background-size: cover; background-position: center; padding: 4rem 0; position: relative; }
.page-banner::after { content: ''; position: absolute; inset: 0; background: rgba(0,66,130,0.75); }
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { color: var(--white); }
.page-header { background: var(--navy); padding: 2.5rem 0; }
.page-header h1 { color: var(--white); margin-bottom: 0; }
.content-grid { display: grid; grid-template-columns: 1fr 340px; gap: 3rem; padding-top: 3rem; padding-bottom: 3rem; }
.content-main { min-width: 0; }
.content-main h2 { margin-top: 2rem; }
.content-main ul, .content-main ol { margin: 1rem 0; padding-left: 1.5rem; }
.content-main li { margin-bottom: 0.5rem; }

/* === Sidebar === */
.content-sidebar { position: sticky; top: 100px; align-self: start; }
.contact-form-box { background: var(--off-white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.75rem; margin-bottom: 2rem; }
.contact-form-box h3 { color: var(--navy); margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.6rem; border: 1px solid var(--gray-300); border-radius: 4px; font-size: 0.95rem; font-family: var(--font-body); }
.form-group textarea { resize: vertical; }
.sidebar-nav { background: var(--off-white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.5rem; }
.sidebar-nav h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { border-bottom: 1px solid var(--gray-200); }
.sidebar-nav li:last-child { border: none; }
.sidebar-nav li a { display: block; padding: 0.5rem 0; font-size: 0.9rem; }
.sidebar-nav li.active a { color: var(--navy); font-weight: 700; }

/* === Blog === */
.list-item { padding: 1.5rem 0; border-bottom: 1px solid var(--gray-200); }
.list-item h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.list-item h2 a { color: var(--navy); }
.read-more { font-weight: 600; font-size: 0.9rem; }
.post-meta { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 0.75rem; }

/* === Page CTA === */
.page-cta { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); text-align: center; }

/* === Footer === */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.8); padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; padding-bottom: 2rem; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: 0.75rem; font-family: var(--font-body); font-weight: 700; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.site-footer a:hover { color: var(--gold); }
.footer-contact p { font-size: 0.85rem; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.25rem 0; text-align: center; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin: 0; }
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* === Landing page layout === */
.landing-page .content-grid { grid-template-columns: 1fr; }
.landing-page .content-main { max-width: 800px; margin: 0 auto; }

/* === Responsive === */
@media (max-width: 768px) {
  .header-top-rates { display: none; }
  .header-notice { display: none; }
  .header-main { padding: 0.35rem 0; }
  .header-main .container { flex-direction: column; text-align: center; gap: 0; }
  .brokerage-licence { display: none; }
  .header-agent { flex-direction: row; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
  .agent-licence { display: none; }
  .agent-contact { display: none; }
  .nav-toggle { display: block; }
  .nav-links { display: none; flex-direction: column; width: 100%; }
  .header-nav.is-open .nav-links { display: flex; }
  .nav-cta { margin: 0; }
  .nav-cta a { margin: 0 !important; border-radius: 0 !important; }
  .hero h1 { font-size: 1.8rem; }
  .why-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .calc-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
