/*
Theme Name: Independent Agents
Theme URI: https://independentagents.co.uk
Author: Independent Agents
Description: Local independent estate agent lead generation platform for Shrewsbury and surrounding areas.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: independentagents
*/

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --cream: #F5F0E8;
  --cream-dark: #EDE7D9;
  --forest: #2C4A3E;
  --forest-light: #3D6356;
  --forest-pale: #E8F0ED;
  --gold: #C4922A;
  --gold-light: #D4A843;
  --charcoal: #1E2622;
  --mid-grey: #6B7A74;
  --light-grey: #B8C4BE;
  --white: #FFFFFF;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  --shadow-sm: 0 2px 8px rgba(44,74,62,0.08);
  --shadow-md: 0 4px 20px rgba(44,74,62,0.12);
  --shadow-lg: 0 8px 40px rgba(44,74,62,0.16);
  --radius: 4px;
  --radius-lg: 8px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

/* ============================================
   RESET & BASE
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--charcoal);
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.4em; }

/* ============================================
   LAYOUT UTILITIES
============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--sm { padding: 48px 0; }
.section--lg { padding: 120px 0; }

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-forest { color: var(--forest); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  letter-spacing: 0.02em;
  text-align: center;
}

.btn--primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn--outline:hover {
  background: var(--forest);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--white {
  background: var(--white);
  color: var(--forest);
  border-color: var(--white);
}
.btn--white:hover {
  background: var(--cream);
  color: var(--forest);
  transform: translateY(-1px);
}

.btn--lg { padding: 18px 42px; font-size: 1.1rem; }

/* ============================================
   HEADER
============================================ */
.site-header {
  background: var(--forest);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-top {
  background: var(--charcoal);
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--light-grey);
}

.header-top .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
}

.header-top a {
  color: var(--light-grey);
  transition: color var(--transition);
}
.header-top a:hover { color: var(--gold); }

.header-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--gold) !important;
}

.header-main {
  padding: 20px 0;
}

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

.site-logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--light-grey);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--light-grey);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.site-nav .btn {
  margin-left: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all var(--transition);
}

/* ============================================
   HERO
============================================ */
.hero {
  background: var(--forest);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 70% 50%, rgba(196,146,42,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: repeating-linear-gradient(
    45deg,
    var(--white) 0px,
    var(--white) 1px,
    transparent 1px,
    transparent 60px
  );
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(196,146,42,0.15);
  border: 1px solid rgba(196,146,42,0.3);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}

.hero-lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

.hero-trust-item svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* Hero Form Card */
.hero-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.form-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.form-card-subtitle {
  font-size: 0.875rem;
  color: var(--mid-grey);
  margin-bottom: 24px;
}

/* WPForms overrides */
.hero-form-card .wpforms-container { margin: 0 !important; }
.hero-form-card .wpforms-field-container { margin: 0 !important; }

.wpforms-field {
  margin-bottom: 16px !important;
  padding: 0 !important;
}

.wpforms-field label {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--charcoal) !important;
  margin-bottom: 6px !important;
  display: block !important;
}

.wpforms-field input,
.wpforms-field select,
.wpforms-field textarea {
  width: 100% !important;
  padding: 11px 14px !important;
  border: 1.5px solid var(--cream-dark) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  color: var(--charcoal) !important;
  background: var(--cream) !important;
  transition: border-color var(--transition) !important;
  outline: none !important;
}

.wpforms-field input:focus,
.wpforms-field select:focus,
.wpforms-field textarea:focus {
  border-color: var(--forest) !important;
  background: var(--white) !important;
}

.wpforms-submit-container { margin-top: 8px !important; }

.wpforms-submit {
  width: 100% !important;
  background: var(--gold) !important;
  color: var(--white) !important;
  border: none !important;
  padding: 15px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius) !important;
  cursor: pointer !important;
  font-family: var(--font-body) !important;
  transition: all var(--transition) !important;
  letter-spacing: 0.02em !important;
}

.wpforms-submit:hover {
  background: var(--gold-light) !important;
  transform: translateY(-1px) !important;
  box-shadow: var(--shadow-md) !important;
}

.form-privacy {
  font-size: 0.75rem;
  color: var(--mid-grey);
  text-align: center;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   TRUST BAR
============================================ */
.trust-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid rgba(44,74,62,0.1);
  padding: 20px 0;
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--forest);
}

.trust-item svg { color: var(--gold); }

/* ============================================
   WHY INDEPENDENT SECTION
============================================ */
.why-section {
  background: var(--white);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.1rem;
  color: var(--mid-grey);
  max-width: 600px;
  margin-bottom: 56px;
}

.reason-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--cream-dark);
  transition: all var(--transition);
  position: relative;
}

.reason-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--forest-pale);
}

.reason-icon {
  width: 48px;
  height: 48px;
  background: var(--forest-pale);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--forest);
}

.reason-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--charcoal);
}

.reason-card p {
  font-size: 0.95rem;
  color: var(--mid-grey);
  line-height: 1.65;
}

/* ============================================
   HOW IT WORKS
============================================ */
.how-section {
  background: var(--forest);
  color: var(--white);
}

.how-section .section-label { color: var(--gold-light); }
.how-section .section-title { color: var(--white); }
.how-section .section-lead { color: rgba(255,255,255,0.65); }

.step-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-number {
  width: 44px;
  height: 44px;
  background: rgba(196,146,42,0.2);
  border: 1px solid rgba(196,146,42,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  flex-shrink: 0;
}

.step-content h4 {
  color: var(--white);
  margin-bottom: 6px;
}

.step-content p {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
}

.how-cta {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

.how-cta h3 { color: var(--white); margin-bottom: 12px; }
.how-cta p { color: rgba(255,255,255,0.65); margin-bottom: 24px; }

/* ============================================
   LOCAL AREA SECTION
============================================ */
.local-section {
  background: var(--cream);
}

.local-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.local-content .section-lead { margin-bottom: 32px; }

.local-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.stat-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--cream-dark);
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--mid-grey);
  font-weight: 500;
}

.area-map {
  background: var(--forest-pale);
  border-radius: var(--radius-lg);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(44,74,62,0.15);
  position: relative;
  overflow: hidden;
}

.area-map-placeholder {
  text-align: center;
  color: var(--forest);
}

.area-map-placeholder svg { margin: 0 auto 12px; opacity: 0.4; }
.area-map-placeholder p { font-size: 0.9rem; color: var(--mid-grey); }

/* ============================================
   BLOG / INSIGHTS
============================================ */
.blog-section { background: var(--white); }

.post-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--cream-dark);
  transition: all var(--transition);
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.post-card-image {
  background: var(--forest-pale);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
  opacity: 0.5;
}

.post-card-body { padding: 28px; }

.post-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}

.post-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--charcoal);
}

.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--forest); }

.post-card p {
  font-size: 0.9rem;
  color: var(--mid-grey);
  margin-bottom: 16px;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--light-grey);
}

/* ============================================
   CTA BANNER
============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  padding: 80px 0;
  text-align: center;
}

.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background: var(--charcoal);
  color: var(--light-grey);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text { color: var(--white); font-size: 1.3rem; }
.footer-brand .logo-sub { color: var(--mid-grey); }

.footer-brand p {
  font-size: 0.9rem;
  color: var(--mid-grey);
  margin-top: 16px;
  line-height: 1.6;
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: var(--mid-grey);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--mid-grey);
}

.footer-contact-item svg { color: var(--gold); flex-shrink: 0; margin-top: 2px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--mid-grey);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: var(--mid-grey); }
.footer-bottom a:hover { color: var(--gold); }

/* ============================================
   PAGE HERO (inner pages)
============================================ */
.page-hero {
  background: var(--forest);
  padding: 64px 0;
  text-align: center;
}

.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.breadcrumb a { color: rgba(255,255,255,0.5); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* ============================================
   CONTENT PAGES
============================================ */
.content-section { background: var(--white); }

.content-body {
  max-width: 720px;
}

.content-body h2 { margin: 48px 0 16px; }
.content-body h3 { margin: 32px 0 12px; }
.content-body p { color: var(--charcoal); line-height: 1.8; }
.content-body ul, .content-body ol { margin-bottom: 1.2em; }
.content-body li { color: var(--charcoal); line-height: 1.7; }

.content-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--cream-dark);
  margin-bottom: 24px;
}

.sidebar-card h4 { margin-bottom: 16px; color: var(--charcoal); }

/* ============================================
   COMPARISON TABLE
============================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--forest);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
}

.comparison-table th:first-child { border-radius: var(--radius) 0 0 0; }
.comparison-table th:last-child { border-radius: 0 var(--radius) 0 0; }

.comparison-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--cream-dark);
  color: var(--charcoal);
}

.comparison-table tr:nth-child(even) td { background: var(--cream); }
.comparison-table tr:last-child td { border-bottom: none; }

.check { color: var(--forest); font-weight: 700; }
.cross { color: #C0392B; }

/* ============================================
   LOCATION PAGE
============================================ */
.location-intro {
  background: var(--white);
  padding: 80px 0;
}

.location-intro .container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 60px;
  align-items: start;
}

/* ============================================
   MOBILE
============================================ */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-form-card { max-width: 520px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .local-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .location-intro .container { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .site-nav { display: none; }
  .mobile-menu-toggle { display: flex; }
  .trust-bar .container { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .local-stats { grid-template-columns: 1fr 1fr; }
  .hero-form-card { padding: 24px; }
}

/* ============================================
   MOBILE NAV OPEN STATE
============================================ */
.site-header.nav-open .site-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--forest);
  padding: 16px;
  gap: 4px;
  box-shadow: var(--shadow-lg);
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.6s ease forwards;
}

.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.4s; opacity: 0; }
