/*
Theme Name: Remortgage Advice UK
Theme URI: https://remortgageadviceuk.co.uk
Author: Remortgage Advice UK
Author URI: https://remortgageadviceuk.co.uk
Description: A professional one-page theme for Remortgage Advice UK - connecting UK homeowners with qualified, FCA-regulated mortgage advisers.
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: remortgage-advice-uk
Tags: one-column, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, translation-ready
*/

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */

:root {
  /* Colors */
  --primary: 222 47% 20%;
  --primary-foreground: 210 40% 98%;
  --secondary: 45 93% 58%;
  --secondary-foreground: 222 47% 15%;
  --background: 0 0% 100%;
  --foreground: 222 47% 15%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 222 47% 25%;
  --accent-foreground: 210 40% 98%;
  --border: 214 32% 91%;
  --ring: 222 47% 20%;
  --radius: 0.75rem;
  
  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', system-ui, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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));
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem 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: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.75rem; }
}

p {
  margin: 0 0 1rem 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.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;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  min-height: 90vh;
  position: relative;
  overflow: hidden;
  padding: 3rem 0 6rem;
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 100vh;
    padding: 5rem 0 8rem;
  }
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

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

.hero-content {
  color: hsl(var(--primary-foreground));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsla(var(--secondary), 0.2);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.hero-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  color: hsl(var(--secondary));
}

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

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

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

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

.hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 36rem;
}

.hero-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
}

.hero-benefits li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.hero-benefits li .icon-wrapper {
  background: hsla(var(--secondary), 0.2);
  border-radius: 9999px;
  padding: 0.375rem;
}

.hero-benefits li svg {
  width: 1rem;
  height: 1rem;
  color: hsl(var(--secondary));
}

.hero-form-wrapper {
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-form-card {
  background: hsl(var(--background));
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl);
}

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

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

.contact-form-card .subtitle {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

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

.form-group input:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsla(var(--ring), 0.1);
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */

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

.btn-primary {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  width: 100%;
}

.btn-primary:hover {
  background: hsl(45 93% 50%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Trust Badges Section
   ========================================================================== */

.trust-section {
  padding: 3rem 0;
  background: hsl(var(--background));
}

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

.trust-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.trust-section .subtitle {
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2rem;
}

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

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

.trust-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  transition: all 0.3s;
}

.trust-card:hover {
  border-color: hsl(var(--secondary));
  box-shadow: var(--shadow-md);
}

.trust-card .icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  margin-bottom: 1rem;
}

.trust-card .icon-wrapper svg {
  width: 2rem;
  height: 2rem;
  color: hsl(var(--primary-foreground));
}

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

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

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
  padding: 4rem 0;
  background: hsl(var(--muted));
}

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

.faq-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.faq-section .subtitle {
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.faq-container {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  background: hsl(var(--background));
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

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

.faq-question svg {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--secondary));
  transition: transform 0.2s;
}

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

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

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

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-section {
  padding: 4rem 0;
  background: hsl(var(--background));
}

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

.testimonials-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.testimonials-section .subtitle {
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin-bottom: 2.5rem;
}

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

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

.testimonial-card {
  background: hsl(var(--muted));
  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;
  color: hsl(var(--secondary));
  fill: hsl(var(--secondary));
}

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

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--accent)) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--primary-foreground));
  font-weight: 600;
  font-size: 0.875rem;
}

.testimonial-info h4 {
  font-size: 0.875rem;
  margin: 0;
}

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

/* ==========================================================================
   SEO Content Section
   ========================================================================== */

.seo-content {
  padding: 4rem 0;
  background: hsl(var(--muted));
}

@media (min-width: 768px) {
  .seo-content {
    padding: 5rem 0;
  }
}

.seo-content .container {
  max-width: 48rem;
}

.seo-content h2 {
  margin-bottom: 1.5rem;
}

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

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

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

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

.seo-content strong {
  color: hsl(var(--foreground));
}

/* ==========================================================================
   Disclaimer Section
   ========================================================================== */

.disclaimer-section {
  padding: 3rem 0;
  background: hsla(var(--muted), 0.5);
}

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

.disclaimer-section .container {
  max-width: 48rem;
}

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

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

.disclaimer h2 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.disclaimer p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.disclaimer p:last-child {
  margin-bottom: 0;
  font-size: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  padding: 3rem 0;
}

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

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-brand svg {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-description {
  opacity: 0.8;
  font-size: 0.875rem;
  line-height: 1.7;
}

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

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  opacity: 0.8;
  font-size: 0.875rem;
  transition: color 0.2s, opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 1;
  color: hsl(var(--secondary));
}

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

.footer-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-trust-item svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid hsla(var(--primary-foreground), 0.2);
  padding-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  opacity: 1;
  color: hsl(var(--secondary));
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

/* Animation delays */
.animation-delay-100 { animation-delay: 100ms; }
.animation-delay-200 { animation-delay: 200ms; }
.animation-delay-300 { animation-delay: 300ms; }
.animation-delay-400 { animation-delay: 400ms; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.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-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
