/* CSS Custom Properties */
:root {
  --color-primary: #c62828;
  --color-primary-dark: #8e0000;
  --color-accent: #2196F3;
  --color-accent-dark: #1976D2;
  --color-success: #4CAF50;
  --color-success-dark: #388E3C;
  --color-text: #333;
  --color-text-light: #555;
  --color-background: #fff;
  --color-background-alt: #f5f5f5;
  --color-border: #ddd;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.3);
  --border-radius: 8px;
  --border-radius-sm: 4px;
  --transition-fast: 0.2s ease;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
  margin: 10px 0;
  font-weight: 400;
}

a {
  color: inherit;
}

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

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0 0 var(--border-radius-sm) 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

/* Fixed top positioning */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Container with padding */
.container {
  padding: 0.01em 16px;
}

/* Content container with max-width */
.content {
  max-width: 980px;
  margin: 0 auto;
}

/* Wide content container */
.content-wide {
  max-width: 1500px;
  margin: 0 auto;
}

/* ===== Navigation Bar ===== */
.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: white;
  letter-spacing: 4px;
  padding: 8px 16px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(0, 0, 0, 0.12);
}

.nav-link {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

.nav-link:hover {
  background-color: #ccc;
}

.nav-right {
  margin-left: auto;
}

/* Logo/Brand styling */
.brand-black {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  font-size: 18px;
}

.brand-red {
  display: inline-block;
  background: var(--color-primary);
  color: #f1f1f1;
  padding: 8px 16px;
  font-size: 18px;
}

/* ===== Text Utilities ===== */
.text-center {
  text-align: center;
}

.text-blue {
  color: #2196F3;
}

.text-red {
  color: var(--color-primary);
}

.text-muted {
  opacity: 0.6;
}

.text-large {
  font-size: 18px;
}

.text-xlarge {
  font-size: 24px;
}

.text-medium {
  font-size: 15px;
}

.text-xxxlarge {
  font-size: 48px;
}

/* ===== Background Utilities ===== */
.bg-red {
  background: var(--color-primary);
  color: #fff;
}

.bg-white {
  background: #fff;
}

.bg-light-grey {
  background: #f1f1f1;
}

.bg-dark-grey {
  background: #616161;
  color: #fff;
}

/* ===== Spacing Utilities ===== */
.padding-16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.padding-32 {
  padding-top: 32px;
  padding-bottom: 32px;
}

.padding-64 {
  padding-top: 64px;
  padding-bottom: 64px;
}

.padding-top-64 {
  padding-top: 64px;
}

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

/* ===== Button Styles ===== */
.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast);
}

.btn:hover {
  background-color: #ccc;
  color: #000;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-light-grey {
  background: #f1f1f1;
  color: #000;
}

.btn-light-grey:hover {
  background: #ddd;
}

/* ===== Grid System ===== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.row > * {
  padding: 0 8px;
}

/* Column sizes - large screens */
.col-l-4 {
  width: 33.33%;
}

/* Column sizes - medium screens */
@media screen and (max-width: 992px) {
  .col-m-6 {
    width: 50%;
  }
}

/* Column sizes - small screens */
@media screen and (max-width: 600px) {
  .col-l-4,
  .col-m-6 {
    width: 100%;
  }
}

/* Third width columns */
.third {
  width: 33.33%;
  float: left;
  padding: 0 16px;
}

@media screen and (max-width: 600px) {
  .third {
    width: 100%;
    float: none;
  }
}

/* ===== Image & Media ===== */
.responsive-img {
  display: block;
  max-width: 100%;
  height: auto;
}

.grayscale {
  filter: grayscale(75%);
}

.grayscale img:hover {
  filter: grayscale(0);
}

/* ===== Hover Effects ===== */
.hover-opacity:hover {
  opacity: 0.6;
}

.hover-text-indigo:hover {
  color: #3f51b5;
}

.hover-text-green:hover {
  color: #4CAF50;
}

/* ===== Hide on Small Screens ===== */
@media screen and (max-width: 600px) {
  .hide-small {
    display: none !important;
  }
}

/* ===== Base Styles ===== */
.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

/* Scoped image border - only for property listings */
.property-img-65,
.property-img-100,
.property-img-35,
.award-img-80,
.award-img-75 {
  border: 1px solid rgb(12, 0, 0);
}

/* Float columns side by side */
.column {
  float: left;
  width: 33.33%;
  padding: 0 10px;
}

/* Remove extra left and right margins, due to padding */
.row-legacy {
  margin: 0 -5px;
}

/* Clear floats after the columns */
.row-legacy:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive columns */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
    display: block;
    margin-bottom: 20px;
  }
}

/* Style the counter cards */
.card {
  box-shadow: var(--shadow-sm);
  padding: 16px;
  text-align: center;
  background-color: #f1f1f1;
}

/* Header section */
#home {
  max-width: 1500px;
}

/* Property images - various widths */
.property-img-65 {
  width: 65%;
}

.property-img-100 {
  width: 100%;
}

.property-img-35 {
  width: 35%;
}

/* Award images */
.award-img-80 {
  width: 80%;
}

.award-img-75 {
  width: 75%;
}

/* Google Maps iframe */
.map-iframe {
  width: 100%;
}

/* Property Cards Grid */
.property-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 20px;
  justify-content: center;
}

.property-card {
  width: calc(33.33% - 20px);
  min-width: 280px;
  max-width: 400px;
  background: var(--color-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.property-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  background-color: var(--color-background-alt);
  border: none;
}

.property-card-content {
  padding: 15px;
}

.property-card-content h3 {
  margin: 0 0 10px 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.property-card-content .price {
  color: var(--color-accent);
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.property-card-content .btn-more-info {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: bold;
  transition: background var(--transition-fast);
}

.property-card-content .btn-more-info:hover {
  background: var(--color-primary-dark);
}

.property-card-content .btn-more-info:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Modal Styles */
.property-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

.modal-content {
  background-color: var(--color-background);
  margin: 5% auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  background: var(--color-primary);
  color: white;
  padding: 20px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h2 {
  margin: 0 0 5px 0;
  font-size: 1.4rem;
}

.modal-header .price {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Modal close button - now a proper button element */
.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  background: transparent;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  color: #ddd;
  background: rgba(255, 255, 255, 0.1);
}

.modal-close:focus {
  outline: 2px solid white;
  outline-offset: 2px;
}

.modal-body {
  padding: 20px;
}

.modal-images {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.modal-images img {
  flex: 1;
  min-width: 200px;
  max-width: calc(33.33% - 10px);
  height: 180px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
}

.modal-description {
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-links a {
  display: inline-block;
  padding: 10px 15px;
  background: var(--color-text);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  font-size: 0.9rem;
  transition: background var(--transition-fast);
}

.modal-links a:hover {
  background: var(--color-text-light);
}

.modal-links a:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.modal-links a.link-gallery {
  background: var(--color-accent);
}

.modal-links a.link-gallery:hover {
  background: var(--color-accent-dark);
}

.modal-links a.link-realtor {
  background: var(--color-success);
}

.modal-links a.link-realtor:hover {
  background: var(--color-success-dark);
}

.modal-links a.link-map {
  background: #E91E63;
}

.modal-links a.link-map:hover {
  background: #C2185B;
}

/* Two-column modal layout for auctions */
.modal-two-column {
  display: flex;
  gap: 20px;
}

.modal-two-column .modal-left {
  flex: 0 0 40%;
  max-width: 40%;
}

.modal-two-column .modal-left img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--color-border);
  object-fit: cover;
}

.modal-two-column .modal-right {
  flex: 1;
}

.modal-two-column .modal-description {
  margin-bottom: 20px;
}

.modal-two-column .modal-links {
  margin-top: auto;
}

/* Responsive adjustments */
@media screen and (max-width: 900px) {
  .property-card {
    width: calc(50% - 20px);
  }

  .modal-images img {
    max-width: calc(50% - 10px);
  }
}

@media screen and (max-width: 600px) {
  .property-card {
    width: 100%;
    max-width: none;
  }

  .modal-content {
    margin: 2% auto;
    width: 95%;
  }

  .modal-images img {
    max-width: 100%;
    height: 150px;
  }

  .modal-links {
    flex-direction: column;
  }

  .modal-links a {
    text-align: center;
  }

  /* Two-column modal stacks on mobile */
  .modal-two-column {
    flex-direction: column;
  }

  .modal-two-column .modal-left {
    flex: none;
    max-width: 100%;
  }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .property-card,
  .btn-more-info,
  .modal-close,
  .modal-links a {
    transition: none;
  }

  .property-card:hover {
    transform: none;
  }
}

/* Clear floats helper */
.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* ===== Staff Cards ===== */
.staff-card {
  width: calc(25% - 30px);
  min-width: 240px;
  max-width: 300px;
  background: var(--color-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.staff-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(50%);
  transition: filter var(--transition-fast);
}

.staff-card:hover img {
  filter: grayscale(0);
}

.staff-card-content {
  padding: 20px;
}

.staff-card-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.staff-role {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.staff-card-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-light);
  margin-bottom: 15px;
}

.btn-contact {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 10px 25px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  transition: background var(--transition-fast);
}

.btn-contact:hover {
  background: var(--color-primary-dark);
}

.btn-contact:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Awards Highlight ===== */
.awards-highlight {
  background: var(--color-background-alt);
  padding: 40px 20px;
  margin-top: 40px;
}

.awards-highlight-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.awards-highlight-content img {
  width: 250px;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.awards-highlight-text {
  text-align: left;
}

.awards-highlight-text h3 {
  font-size: 1.8rem;
  margin: 0 0 5px 0;
  color: var(--color-primary);
}

.awards-highlight-text .quote {
  font-style: italic;
  color: var(--color-text-light);
  margin-top: 15px;
  padding-left: 15px;
  border-left: 3px solid var(--color-primary);
}

/* Responsive staff cards */
@media screen and (max-width: 900px) {
  .staff-card {
    width: calc(50% - 20px);
  }

  .awards-highlight-content {
    flex-direction: column;
    text-align: center;
  }

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

  .awards-highlight-text .quote {
    border-left: none;
    padding-left: 0;
    border-top: 3px solid var(--color-primary);
    padding-top: 15px;
  }
}

@media screen and (max-width: 600px) {
  .staff-card {
    width: 100%;
    max-width: none;
  }

  .awards-highlight-content img {
    width: 200px;
  }
}

/* ===== Award Cards ===== */
.award-card {
  width: calc(33.33% - 30px);
  min-width: 280px;
  max-width: 350px;
  background: var(--color-background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.award-card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  background: var(--color-background-alt);
  padding: 20px;
}

.award-card-content {
  padding: 20px;
}

.award-card-content h3 {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
}

.award-source {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.award-card-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text-light);
  margin-bottom: 15px;
}

.btn-award {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background var(--transition-fast);
}

.btn-award:hover {
  background: var(--color-accent-dark);
}

.btn-award:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive award cards */
@media screen and (max-width: 900px) {
  .award-card {
    width: calc(50% - 20px);
  }
}

@media screen and (max-width: 600px) {
  .award-card {
    width: 100%;
    max-width: none;
  }
}

/* ===== Search Components ===== */
.search-container {
  max-width: 600px;
  margin: 20px auto;
  padding: 0 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 15px;
  color: var(--color-text-light);
  font-size: 1.1rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 15px 45px;
  font-size: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-background);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.search-input::placeholder {
  color: #999;
}

.search-clear {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--color-text-light);
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.search-clear:hover {
  color: var(--color-primary);
  background: var(--color-background-alt);
}

.search-clear:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.search-results-count {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* No Results Message */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-light);
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.3;
}

.no-results h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  color: var(--color-text);
}

.no-results p {
  margin: 0;
  font-size: 1rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--color-accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

.link-button:hover {
  color: var(--color-accent-dark);
}

.link-button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Property card hidden state for search */
.property-card.hidden {
  display: none;
}

/* Search highlight */
.search-highlight {
  background-color: rgba(255, 235, 59, 0.4);
  padding: 0 2px;
  border-radius: 2px;
}

/* Responsive search */
@media screen and (max-width: 600px) {
  .search-container {
    padding: 0 15px;
  }

  .search-input {
    padding: 12px 40px;
    font-size: 0.95rem;
  }
}
