/* ============================================================
 * THE REAL ESTATE COMPANY - Main Stylesheet
 * Ported from Divi child theme
 * Brand colors (extracted from live site):
 *   Primary green:  #044704 (Divi accent color)
 *   Accent tan:     #bfa37c (gold/tan)
 *   Dark bg:        #2d3940
 *   Text on dark:   #ffffff
 *   Body text:      #666666
 *   Link color:     #2ea3f2 (Divi default blue)
 * ============================================================ */

/* -----------------------------------------------
   CSS Custom Properties (Design Tokens)
   ----------------------------------------------- */
:root {
  /* Brand Colors */
  --color-primary: #000;
  --color-primary-dark: #000;
  --color-primary-light: #1a1a1a;
  --color-accent: #bfa37c;
  --color-accent-dark: #a88b64;
  --color-accent-light: #d4bfa0;
  --color-text: #666666;
  --color-text-dark: #333333;
  --color-text-light: #999999;
  --color-text-on-dark: #ffffff;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f4f4;
  --color-bg-dark: #000;
  --color-border: #e2e2e2;
  --color-link: #2ea3f2;
  --color-link-hover: #2ea3f2;

  /* Typography */
  --font-primary: 'Open Sans', Arial, Helvetica, sans-serif;
  --font-heading: 'Open Sans', Arial, Helvetica, sans-serif;
  --font-size-base: 14px;
  --font-size-small: 12px;
  --font-size-h1: 30px;
  --font-size-h2: 26px;
  --font-size-h3: 22px;
  --font-size-h4: 18px;
  --line-height-base: 1.7;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 5rem;

  /* Layout */
  --container-width: 1080px;
  --container-max: 80%;
}

/* -----------------------------------------------
   Reset & Base
   ----------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-base);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

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

/* -----------------------------------------------
   Typography
   ----------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  line-height: 1.2;
  font-weight: 500;
  padding-bottom: 10px;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

p {
  margin: 0 0 1em;
  line-height: var(--line-height-base);
}

/* -----------------------------------------------
   Container
   ----------------------------------------------- */
.container {
  width: var(--container-max);
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
}

.container::after {
  content: '';
  display: table;
  clear: both;
}

/* -----------------------------------------------
   Utility
   ----------------------------------------------- */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* -----------------------------------------------
   Page Container
   ----------------------------------------------- */
#page-wrapper {
  overflow: hidden;
  position: relative;
}

#main-content {
  background-color: var(--color-bg);
}

.content-area-wrapper {
  display: flex;
  flex-wrap: wrap;
  padding: var(--spacing-xl) 0;
}

.content-region {
  flex: 1 1 0%;
  min-width: 0;
}

.sidebar {
  width: 25%;
  min-width: 250px;
  padding-left: 5%;
}

/* -----------------------------------------------
   Skip Link
   ----------------------------------------------- */
.skip-link {
  position: absolute;
  top: -1000px;
  left: 0;
  z-index: 1000;
  padding: 10px;
  background: #000;
  color: #fff;
}

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

/* -----------------------------------------------
   WordPress alignment classes (migrated content)
   ----------------------------------------------- */
.alignleft { float: left; margin: 0 15px 15px 0; }
.alignright { float: right; margin: 0 0 15px 15px; }
.aligncenter { display: block; margin: 0 auto; }

/* -----------------------------------------------
   Back to Top Button
   ----------------------------------------------- */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 3px;
  background: var(--color-primary);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: opacity 0.3s;
  opacity: 0.8;
}

.back-to-top.visible {
  display: block;
}

.back-to-top:hover {
  opacity: 1;
}
