* { box-sizing: border-box; }

body { 
  font-family: 'Sarabun', sans-serif; 
  background-color: #f5f7fa; 
  margin: 0; 
  padding: 0; 
  color: #2c3e50;
}

/* ===== NAVBAR ===== */
nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  min-height: 80px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav img {
  height: 50px;
  object-fit: contain;
}

nav a {
  font-size: 15px;
  font-weight: 600;
  height: 100%;
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  color: #2c3e50;
  transition: color 0.25s;
}

nav a:hover {
  color: #0066cc;
}

nav .flex-nav {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

.auth-menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #f0f4f8;
  border-radius: 20px;
}

.auth-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0066cc;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.btn-logout {
  background: #ef4444;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s;
  font-family: 'Sarabun', sans-serif;
}

.btn-logout:hover {
  background: #dc2626;
}

.btn-login {
  background: #0066cc;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-family: 'Sarabun', sans-serif;
}

.btn-login:hover {
  background: #0052a3;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, #0066cc, #0052a3);
  color: white;
  padding: 60px 20px 80px 20px;
  text-align: center;
}

.page-header h1 {
  font-size: 40px;
  margin: 0 0 12px 0;
  font-weight: 700;
}

.page-header p {
  font-size: 18px;
  margin: 0;
  opacity: 0.95;
}

/* ===== FILTER/FORM BOX ===== */
.filter-section {
  max-width: 800px;
  margin: -50px auto 50px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.filter-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border: 1px solid #e8ecf1;
}

.filter-box h3 {
  margin: 0 0 24px 0;
  color: #2c3e50;
  font-weight: 700;
  font-size: 22px;
  text-align: center;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.filter-box label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.filter-box input,
.filter-box select,
.filter-box textarea {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  transition: all 0.25s;
  width: 100%;
  background: #fff;
}

.filter-box textarea {
  resize: vertical;
  min-height: 120px;
}

.filter-box input:focus,
.filter-box select:focus,
.filter-box textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

.filter-box button {
  background: #0066cc;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  width: 100%;
  margin-top: 10px;
}

.filter-box button:hover {
  background: #0052a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

/* ===== HOUSE/BENEFITS CONTAINER ===== */
.house-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.house-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border: 1px solid #e8ecf1;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.house-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.house-info {
  padding: 30px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.house-info .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.house-info h3 {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
}

.house-info .specs {
  font-size: 15px;
  color: #666;
  margin: 0;
  line-height: 1.6;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  nav .flex-nav { gap: 20px; }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    padding: 12px 16px;
  }

  nav .flex-nav {
    width: 100%;
    margin-left: 0;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  nav a { font-size: 14px; }

  .page-header {
    padding: 40px 20px 60px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .filter-section {
    margin: -30px auto 40px;
  }

  .filter-box {
    padding: 24px;
  }

  .filter-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  nav img { height: 42px; }
  nav a { font-size: 13px; }
  
  .page-header h1 { font-size: 24px; }
  .page-header p { font-size: 14px; }
  
  .filter-box { padding: 20px; }
  .filter-box h3 { font-size: 18px; }
}