/*
Theme Name: Budapartment
Author: Budapartment Team
Description: A premium real estate theme for showcasing properties in Budapest.
Version: 1.0
*/

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: #f5f5f5;
  color: #333;
  padding-top: 80px; /* Account for fixed header */
}

/* Admin bar adjustments */
body.admin-bar {
  padding-top: 112px; /* 80px header + 32px admin bar */
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    padding-top: 126px; /* 80px header + 46px mobile admin bar */
  }
}

/* Header Styles */
header {
  background-color: #ffffff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 999;
}

body.admin-bar header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar header {
    top: 46px;
  }
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-branding a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  height: 30px;
  margin-right: 0.625rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

/* Navigation Styles */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 1.875rem;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.main-navigation a:hover {
  color: #c89f62;
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 0.625rem 1.25rem;
  }
  
  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .main-navigation a {
    font-size: 0.875rem;
  }
  
  body {
    padding-top: 120px; /* Taller header on mobile */
  }
  
  body.admin-bar {
    padding-top: 166px;
  }
}

/* Hero Section */
.hero {
  position: relative;
  height: clamp(400px, 60vh, 600px);
  background: url('images/hero.png') no-repeat center center/cover;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 1rem;
}

.search-overlay {
  background-color: rgba(255, 255, 255, 0.95);
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 12px;
  text-align: center;
  width: 100%;
  max-width: 800px;
  backdrop-filter: blur(10px);
}

.search-overlay h1 {
  margin: 0 0 1rem 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  color: #333;
}

/* Search Form */
.property-search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.property-search-form select,
.property-search-form input,
.property-search-form button {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.property-search-form button {
  background-color: #c89f62;
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  grid-column: 1 / -1;
}

.property-search-form button:hover {
  background-color: #b8925a;
}

@media screen and (max-width: 480px) {
  .property-search-form {
    grid-template-columns: 1fr;
  }
}

/* Featured Properties Section */
.featured-properties {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1.25rem;
}

.featured-properties h2 {
  text-align: center;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  color: #333;
}

/* Property Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media screen and (max-width: 640px) {
  .property-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .property-grid {
    grid-template-columns: 1fr;
  }
}

/* Property Cards */
.property-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  background: white;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.property-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.property-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.property-info {
  padding: 1.25rem;
  height: calc(100% - 200px);
  display: flex;
  flex-direction: column;
}

.property-info h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.property-location,
.property-price {
  font-size: 1rem;
  color: #666;
  margin: 0 0 0.5rem;
}

.property-price {
  font-weight: 600;
  color: #c89f62;
  margin-top: auto;
}

/* Single Property Page */
.property-single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media screen and (max-width: 768px) {
  .property-single-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem 1rem;
  }
}

.property-details h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 1.5rem;
  color: #333;
}

.property-details img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.property-meta {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.property-meta p {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.property-meta p:last-child {
  margin-bottom: 0;
}

.contact-agent-wrapper {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

@media screen and (max-width: 768px) {
  .contact-agent-wrapper {
    position: static;
  }
}

.contact-agent-wrapper h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  color: #333;
}

/* Author/Agent Pages */
.agent-profile-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.agent-profile-container h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin: 0 0 1rem;
  color: #333;
}

.agent-bio {
  font-size: 1.1rem;
  margin: 0 0 2rem;
  color: #555;
  line-height: 1.7;
}

.agent-properties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media screen and (max-width: 480px) {
  .agent-properties {
    grid-template-columns: 1fr;
  }
}

.property-summary {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  background: white;
  transition: all 0.3s ease;
}

.property-summary:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.property-summary img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.property-summary h3 {
  margin: 0.75rem 0;
  font-size: 1.2rem;
  color: #333;
}

.contact-agent-form {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #ddd;
}

.contact-agent-form h2 {
  font-size: 1.75rem;
  margin: 0 0 1.5rem;
  color: #333;
}

/* Agents Page */
.agents-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.agents-page h2 {
  text-align: center;
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin: 0 0 2.5rem;
  color: #333;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

@media screen and (max-width: 480px) {
  .agents-grid {
    grid-template-columns: 1fr;
  }
}

.agent-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.agent-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.agent-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
}

.agent-info h3 {
  margin: 0.75rem 0;
  font-size: 1.25rem;
  color: #333;
}

.agent-info p {
  margin: 0.25rem 0;
  font-size: 0.95rem;
  color: #666;
}

/* Show More Button */
.show-more {
  text-align: center;
  margin-top: 2.5rem;
}

.show-more a,
.show-more button {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: #c89f62;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.show-more a:hover,
.show-more button:hover {
  background-color: #b8925a;
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  background-color: #1a1a2e;
  color: #d4af37;
  padding: 2.5rem 1.25rem 1.5rem;
  font-size: 0.875rem;
  margin-top: 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

@media screen and (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-column h3 {
  color: white;
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.footer-column p,
.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #d4af37;
  line-height: 1.6;
}

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

.footer-column ul li a {
  color: #d4af37;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media screen and (max-width: 768px) {
  .social-links {
    justify-content: center;
  }
}

.social-links li a {
  font-size: 1.25rem;
  color: #d4af37;
  transition: color 0.3s ease;
}

.social-links li a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  font-size: 0.8125rem;
  color: #999;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

/* Responsive Images */
img {
  max-width: 100%;
  height: auto;
}

/* Form Improvements */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #c89f62;
  box-shadow: 0 0 0 3px rgba(200, 159, 98, 0.1);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Accessibility Improvements */
.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;
}

/* Focus indicators */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #c89f62;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .property-card {
    border: 2px solid #333;
  }
  
  .property-card:hover {
    border-color: #c89f62;
  }
}