:root {
  --primary: #1f4d3d;
  --accent: #c9a24b;
  --light: #f7f5f0;
  --dark: #1a1a1a;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.logo span { color: var(--accent); }

.logo-img {
  height: 60px;
  display: block;
  animation: rotate3d 6s infinite ease-in-out;
}

@keyframes rotate3d {
  0%, 100% { transform: rotateY(0deg); }
  50% { transform: rotateY(15deg); }
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent); }

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.btn:hover { opacity: 0.85; }

.btn-primary { background: var(--accent); color: #1a1a1a; border: 2px solid var(--accent); }
.btn-outline { border: 2px solid var(--accent); color: #fff; background: none; }
.btn-outline-dark { border: 1px solid var(--primary); color: var(--primary); background: none; cursor: pointer; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(rgba(20,40,30,0.55), rgba(20,40,30,0.55)),
    url("../images/hero.svg") center/cover no-repeat;
  color: #fff;
  padding: 120px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero image slider */
.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  color: #fff;
}

.hero-slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider .slide.active {
  opacity: 1;
}

.hero-slider-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,40,30,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  z-index: 2;
}

.hero-slider-overlay h1 {
  font-size: 2.6rem;
  margin-bottom: 16px;
}

.hero-slider-overlay p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* About text */
.about-text {
  max-width: 780px;
  margin: 0 auto;
  color: #444;
}

.about-text p {
  margin-bottom: 18px;
}

/* Services scroll */
.services-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

.service-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--light);
  border-radius: 8px;
  padding: 28px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.service-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
  color: #555;
}

/* Reviews scroll */
.reviews-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
}

.review-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-card .stars {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.review-card p {
  color: #333;
  font-style: italic;
  margin-bottom: 14px;
}

.review-card .reviewer {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
}

/* Sections */
section { padding: 72px 24px; }

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--primary);
}

.section-sub {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
  color: #555;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background: var(--light);
  border-radius: 8px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card h3 { margin: 16px 0 10px; color: var(--primary); }
.card p { color: #555; margin-bottom: 20px; font-size: 0.95rem; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.property-card, .team-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.property-card img, .team-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #ddd;
}

.property-card .info, .team-card .info { padding: 18px; }
.property-card h3 { color: var(--primary); margin-bottom: 6px; }
.property-card .price { color: var(--accent); font-weight: 700; margin: 8px 0; }
.team-card { text-align: center; }
.team-card img { height: 240px; }
.team-card h3 { margin-top: 14px; }
.team-card .role { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.team-card .contact { font-size: 0.9rem; color: #555; }

.bg-light { background: var(--light); }

/* Property search */
.search-hero {
  background: var(--light);
  padding-bottom: 32px;
}

.search-filters {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.search-filters select, .search-filters input {
  width: auto;
  min-width: 140px;
  flex: 1 1 160px;
}

.search-filters button {
  flex: 0 0 auto;
}

.search-results-wrap {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
}

.search-map-col {
  flex: 1 1 45%;
  position: sticky;
  top: 90px;
}

#map {
  height: 640px;
  border-radius: 8px;
  z-index: 1;
}

.search-list-col {
  flex: 1 1 55%;
  max-height: 640px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 8px;
}

.search-list-col .property-card {
  display: flex;
  flex-direction: row;
}

.search-list-col .property-card img {
  width: 200px;
  height: auto;
  flex: 0 0 200px;
}

.search-list-col .property-card .info {
  padding: 16px;
}

.search-list-col .property-card .info p {
  font-size: 0.88rem;
  color: #555;
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .search-results-wrap { flex-direction: column; }
  .search-map-col { position: static; width: 100%; }
  .search-list-col { max-height: none; overflow-y: visible; }
  .search-list-col .property-card { flex-direction: column; }
  .search-list-col .property-card img { width: 100%; flex: none; height: 200px; }
}

/* Property detail page */
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: var(--max-width);
  margin: 0 auto 40px;
}

.detail-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.detail-info {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.detail-info .price {
  font-size: 1.6rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  list-style: none;
}

.detail-facts li {
  background: var(--light);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.detail-description {
  text-align: left;
  color: #444;
  margin-bottom: 28px;
}

/* Rental application form */
.application-form {
  max-width: 820px;
}

.app-section {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.app-section legend {
  font-weight: 700;
  color: var(--primary);
  padding: 0 8px;
  font-size: 1.1rem;
}

.app-section > div {
  margin-bottom: 16px;
}

.repeat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: var(--light);
  border-radius: 6px;
  margin-bottom: 12px;
  position: relative;
}

.repeat-row .remove-row-btn {
  grid-column: 1 / -1;
  justify-self: end;
  background: none;
  border: none;
  color: #b00020;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.repeat-row label {
  font-size: 0.8rem;
  display: block;
  margin-bottom: 4px;
}

.add-row-btn {
  cursor: pointer;
}

.yesno-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  gap: 16px;
  flex-wrap: wrap;
}

.yesno-toggle {
  display: flex;
  gap: 16px;
}

.yesno-toggle label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.95rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
}

.checkbox-row input {
  width: auto;
  margin-top: 4px;
}

.signature-input {
  font-family: "Brush Script MT", cursive;
  font-size: 1.4rem;
}

/* Admin action bar */
.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 40px;
}

.admin-actions .btn {
  text-align: center;
  padding: 14px 20px;
}

.admin-table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
}

.admin-table thead th {
  border-bottom: 2px solid #eee;
  color: var(--primary);
}

.admin-table tbody tr {
  border-bottom: 1px solid #eee;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 30px;
}

.admin-photo-item {
  background: var(--light);
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
}

.admin-photo-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.admin-photo-item form {
  padding: 8px;
}

.admin-photo-item button {
  width: 100%;
  padding: 6px;
  font-size: 0.8rem;
}

/* Application detail (admin) */
.app-detail-header {
  max-width: 900px;
  margin: 0 auto 24px;
}

.app-detail-header h2 {
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.decision-badge {
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.decision-form {
  margin-top: 10px;
}

.decision-form select {
  width: auto;
  display: inline-block;
}

.app-tabs {
  max-width: 900px;
  margin: 0 auto 24px;
  display: flex;
  gap: 28px;
  border-bottom: 2px solid #eee;
}

.app-tabs a {
  padding: 10px 4px;
  font-weight: 600;
  color: #777;
  border-bottom: 3px solid transparent;
}

.app-tabs a.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.app-tab-panel {
  max-width: 900px;
  margin: 0 auto;
}

.app-detail-card {
  background: var(--light);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.app-detail-card h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.app-detail-card p {
  font-size: 0.92rem;
  color: #444;
  margin-bottom: 8px;
}

.request-row {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 12px;
}

.request-row form {
  flex-direction: row;
  gap: 8px;
  margin-top: 8px;
}

.request-row input[type="text"] {
  width: auto;
  flex: 1;
}
form {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

label { font-weight: 600; font-size: 0.9rem; }

input, select, textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  width: 100%;
}

textarea { resize: vertical; min-height: 120px; }

footer {
  background: var(--dark);
  color: #ccc;
  padding: 48px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid h4 { color: #fff; margin-bottom: 14px; }
.footer-grid p, .footer-grid a { color: #bbb; font-size: 0.9rem; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid #333;
  font-size: 0.85rem;
  color: #888;
}

/* Modern Portal Styling */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
}

.portal-header {
  background: linear-gradient(135deg, var(--primary) 0%, #2a6249 100%);
  color: #fff;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(31, 77, 61, 0.2);
}

.portal-header h2 {
  font-size: 1.8rem;
}

.portal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid #e0e0e0;
  flex-wrap: wrap;
  justify-content: center;
}

.portal-tabs a, .portal-tabs button {
  padding: 14px 24px;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  text-decoration: none;
}

.portal-tabs a:hover, .portal-tabs button:hover {
  color: var(--accent);
}

.portal-tabs .active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.portal-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.portal-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.portal-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.portal-card-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary) 0%, #2a6249 100%);
  object-fit: cover;
  display: block;
}

.portal-card-content {
  padding: 24px;
}

.portal-card-content h3 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.portal-card-content p {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.portal-card .btn {
  width: 100%;
  text-align: center;
}

/* Section with Background Image */
.section-bg-image {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 80px 24px;
  color: #fff;
  text-align: center;
}

.section-bg-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(31, 77, 61, 0.65);
  z-index: 1;
}

.section-bg-image > * {
  position: relative;
  z-index: 2;
}

.section-bg-image h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.section-bg-image p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Guarantee Section */
.guarantees-section {
  background: var(--light);
  padding: 60px 24px;
  text-align: center;
}

.guarantees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.guarantee-item {
  background: #fff;
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.guarantee-item:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.guarantee-item-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.guarantee-item h3 {
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.guarantee-item p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Resources/Coming Tabs Content */
.resource-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.resource-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.resource-item-name {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.05rem;
}

.resource-item-date {
  color: #999;
  font-size: 0.9rem;
  margin-top: 4px;
}

.resource-actions {
  display: flex;
  gap: 12px;
}

.resource-actions .btn {
  width: auto;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Important Information Box */
.important-info-box {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.important-info-box h4 {
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.important-info-box ul {
  list-style: none;
  padding: 0;
}

.important-info-box li {
  padding: 8px 0;
  color: #555;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
}

.important-info-box li:last-child {
  border-bottom: none;
}

.important-info-box li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: bold;
  margin-right: 8px;
}

/* Change Password Form */
.password-form-container {
  max-width: 500px;
  margin: 0 auto 32px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.password-form-container h3 {
  color: var(--primary);
  margin-bottom: 24px;
  font-size: 1.3rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.1);
}

.form-submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 162, 75, 0.3);
}

/* Admin Document Management */
.document-upload-form {
  background: var(--light);
  border: 2px dashed var(--accent);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.document-upload-form input[type="file"] {
  width: 100%;
  padding: 12px;
  margin: 16px 0;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.document-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.document-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.document-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.document-name {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  word-break: break-word;
}

.document-date {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.document-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.document-actions button {
  flex: 1;
  padding: 6px 12px;
  font-size: 0.8rem;
}

@media (max-width: 800px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 2rem; }
  .hero-slider { height: 420px; }
  .hero-slider-overlay h1 { font-size: 2rem; }
  .portal-tabs { justify-content: flex-start; overflow-x: auto; }
  .guarantees-grid { grid-template-columns: 1fr; }
}
