/*
Theme Name: Halifax Renewal Mortgage
Theme URI: https://halifaxrenewalmortgage.co.uk
Author: HRM
Author URI: https://halifaxrenewalmortgage.co.uk
Description: A professional, SEO-optimized one-page theme for Halifax Mortgage Renewal lead generation. Features a prominent contact form, trust badges, testimonials, FAQ section, and comprehensive SEO content.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hrm-theme
Tags: one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===========================
   CSS Variables / Design Tokens
   =========================== */
:root {
  /* Primary Colors - Navy */
  --primary: 217 45% 18%;
  --primary-foreground: 0 0% 100%;
  
  /* Secondary Colors - Gold */
  --secondary: 43 74% 49%;
  --secondary-foreground: 217 45% 18%;
  
  /* Background & Foreground */
  --background: 210 20% 98%;
  --foreground: 217 45% 18%;
  
  /* Card */
  --card: 0 0% 100%;
  --card-foreground: 217 45% 18%;
  
  /* Muted */
  --muted: 210 15% 95%;
  --muted-foreground: 217 20% 45%;
  
  /* Accent */
  --accent: 43 74% 49%;
  --accent-foreground: 217 45% 18%;
  
  /* Border & Input */
  --border: 217 20% 85%;
  --input: 217 20% 85%;
  --ring: 43 74% 49%;
  
  /* Radius */
  --radius: 0.5rem;
  
  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===========================
   Base Styles
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0;
  color: hsl(var(--foreground));
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.75rem; }
}

p {
  margin: 0 0 1rem;
}

a {
  color: hsl(var(--secondary));
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(43 74% 40%);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===========================
   Layout
   =========================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 0;
  }
}

/* ===========================
   Skip Link (Accessibility)
   =========================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ===========================
   Header
   =========================== */
.site-header {
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
}

.site-logo span {
  color: hsl(var(--secondary));
}

.location-badge {
  display: none;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
  }
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  background: linear-gradient(135deg, hsl(217 45% 18%) 0%, hsl(217 45% 25%) 50%, hsl(217 45% 20%) 100%);
  color: hsl(var(--primary-foreground));
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center right, hsla(43 74% 49% / 0.1), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.hero-content {
  text-align: center;
}

@media (min-width: 1024px) {
  .hero-content {
    text-align: left;
  }
}

.hero h1 {
  color: hsl(var(--primary-foreground));
  margin-bottom: 1rem;
  font-size: 2rem;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
}

.hero h1 .highlight {
  color: hsl(var(--secondary));
}

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

/* Trust Indicators below form */
.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.trust-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-indicator svg {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--secondary));
}

/* ===========================
   Contact Form
   =========================== */
.form-card {
  background: hsl(var(--card));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .form-card {
    padding: 2rem;
  }
}

.form-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.form-header h2 {
  color: hsl(var(--foreground));
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.form-header p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  margin: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin-bottom: 0.25rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: hsl(var(--secondary));
  box-shadow: 0 0 0 3px hsla(43 74% 49% / 0.2);
}

.form-input::placeholder {
  color: hsl(var(--muted-foreground));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(43 74% 55%) 100%);
  color: hsl(var(--secondary-foreground));
  box-shadow: 0 4px 14px 0 hsla(43 74% 49% / 0.4);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 hsla(43 74% 49% / 0.5);
}

.btn-outline {
  background: transparent;
  color: hsl(var(--primary-foreground));
  border: 2px solid hsla(var(--primary-foreground) / 0.3);
}

.btn-outline:hover {
  background: hsla(var(--primary-foreground) / 0.1);
  border-color: hsl(var(--primary-foreground));
}

.form-privacy {
  text-align: center;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 1rem;
}

.form-privacy svg {
  display: inline;
  width: 0.875rem;
  height: 0.875rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* ===========================
   Trust Badges Section
   =========================== */
.trust-badges {
  background: hsl(var(--card));
  border-bottom: 1px solid hsl(var(--border));
  padding: 2rem 0;
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .trust-badges-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.trust-badge-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(43 74% 55%) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--secondary-foreground));
}

.trust-badge-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.trust-badge h3 {
  font-size: 0.875rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0;
}

.trust-badge p {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* ===========================
   Benefits Section
   =========================== */
.benefits {
  background: hsl(var(--background));
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: hsl(var(--muted-foreground));
  max-width: 600px;
  margin: 0 auto;
}

.benefits-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.benefit-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.benefit-card:hover {
  box-shadow: 0 10px 40px -10px hsla(var(--primary) / 0.15);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(217 45% 25%) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary-foreground));
  margin-bottom: 1rem;
}

.benefit-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.benefit-card h3 {
  font-size: 1.125rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.benefit-card p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* ===========================
   FAQ Section
   =========================== */
.faq {
  background: hsl(var(--muted));
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: hsl(var(--foreground));
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.faq-question:hover {
  background: hsl(var(--muted));
}

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works {
  background: hsl(var(--card));
}

.steps-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(43 74% 55%) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--secondary-foreground));
  margin: 0 auto 1rem;
}

.step h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* ===========================
   Testimonials Section
   =========================== */
.testimonials {
  background: hsl(var(--background));
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.testimonial-stars svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: hsl(var(--secondary));
  color: hsl(var(--secondary));
}

.testimonial-quote {
  font-style: italic;
  margin-bottom: 1rem;
  color: hsl(var(--foreground));
}

.testimonial-author {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

/* ===========================
   SEO Content Section
   =========================== */
.seo-content {
  background: hsl(var(--card));
}

.seo-content article {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.seo-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.seo-content p {
  color: hsl(var(--muted-foreground));
  line-height: 1.8;
}

.seo-content ul,
.seo-content ol {
  color: hsl(var(--muted-foreground));
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.seo-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ===========================
   Disclaimer Section
   =========================== */
.disclaimer {
  background: hsl(var(--muted));
  border-top: 1px solid hsl(var(--border));
}

.disclaimer-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  max-width: 800px;
  margin: 0 auto;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--secondary));
}

.disclaimer-content h3 {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.disclaimer-content p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.5rem;
}

.disclaimer-content p:last-child {
  margin-bottom: 0;
}

/* ===========================
   CTA Section
   =========================== */
.cta {
  background: linear-gradient(135deg, hsl(217 45% 18%) 0%, hsl(217 45% 25%) 100%);
  color: hsl(var(--primary-foreground));
  text-align: center;
}

.cta h2 {
  color: hsl(var(--primary-foreground));
  margin-bottom: 1rem;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: hsl(217 45% 12%);
  color: hsl(var(--primary-foreground));
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section h3 {
  color: hsl(var(--primary-foreground));
  font-size: 1rem;
  font-family: var(--font-body);
  margin-bottom: 1rem;
}

.footer-section h3.footer-heading-bold {
  font-weight: 700;
}

.footer-section p,
.footer-section a {
  font-size: 0.875rem;
  color: hsla(var(--primary-foreground) / 0.7);
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: hsl(var(--secondary));
}

.footer-bottom {
  border-top: 1px solid hsla(var(--primary-foreground) / 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: hsla(var(--primary-foreground) / 0.5);
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

/* ===========================
   Utility Classes
   =========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: hsl(var(--muted-foreground));
}
