@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");

:root {
  --primary-color: #4a5db5; /* Logo blue/purple */
  --link-color: #0000ee;
  --bg-color: #ffffff;
  --header-bg: #f1f1f1;
  --text-color: #333333;
  --border-color: #d4d4d4;
  --font-family: "Space Grotesk", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Global Placeholder Reset */
input::placeholder,
textarea::placeholder,
select::placeholder,
input,
textarea,
select,
button {
  font-family: var(--font-family);
}

.container {
  max-width: 1010px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: 40px;
}

.logo .logo-primary {
  color: var(--primary-color);
}

.logo .logo-secondary {
  color: #000;
}

.post-ad {
  font-size: 15px;
  font-weight: bold;
  color: var(--link-color);
  text-decoration: none;
}

.post-ad:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 30px 0;
}

.hero h1 {
  font-size: 19px;
  margin-bottom: 3px;
  color: #000;
}

.hero p {
  color: #666;
  font-size: 14px;
  max-width: 950px;
  margin: 0 auto 30px;
}

/* Search Bar */
.search-container {
  max-width: 500px;
  margin: 0 auto 0px;
}

.search-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  font-size: 15px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-color);
}

/* Location Box */
.location-box {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 30px;
}

.location-header {
  background-color: var(--header-bg);
  padding: 8px 15px;
  font-size: 18px;
  font-weight: bold;
  border-bottom: 1px solid var(--border-color);
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 12px;
  gap: 5px;
}

.location-grid a:hover {
  text-decoration: underline;
}

.location-grid a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 15px;
  display: inline-block;
}

@media (max-width: 800px) {
  .location-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 550px) {
  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 400px) {
  .location-grid {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Informational Sections */
.info-section {
  padding-top: 5px;
  margin-top: 80px;
  margin-bottom: 40px;
}

.info-section h3 {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #000;
}

.info-section p {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.5;
}

.info-section a {
  color: var(--link-color);
  text-decoration: none;
}

.info-section a:hover {
  text-decoration: underline;
}

.info-section strong {
  font-weight: bold;
}

.section-divider {
  border: 0;
  border-top: 1.5px solid #e1e1e1;
  margin: 30px 0 16px 0;
}

.info-list {
  list-style: none;
  padding: 0;
  margin-bottom: 25px;
}

.info-list li {
  font-size: 16px;
  color: #333;
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}

.info-list li::before {
  content: "\25AA";
  position: absolute;
  left: 0;
  color: #333;
  font-size: 20px;
  top: -4px;
}

.faq-section {
  margin-top: 40px;
}

.faq-item {
  margin-bottom: 25px;
}

.faq-item strong {
  display: block;
  font-size: 16px;
  color: #000;
  margin-bottom: 5px;
}

.faq-item p {
  margin-bottom: 0;
}

footer {
  border-top: 1px solid #eeeeee;
  padding: 20px 0 20px;
  margin-top: 0px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  color: #666;
}

.footer-right a {
  margin-left: 20px;
  color: var(--link-color);
  text-decoration: none;
}

.footer-right a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 15px;
  }
  .location-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 15px;
  }
  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .footer-right a {
    margin: 0 10px;
  }
}

/* Auth Pages (Login/Register) */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0 60px;
  min-height: calc(100vh - 200px);
}

.form-box {
  width: 100%;
  max-width: 480px;
  border: 1px solid #ddd;
  background: white;
  margin-bottom: 25px;
  border-radius: 4px;
  overflow: hidden;
}

.form-header {
  background-color: #f0f0f0;
  padding: 2px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.form-body {
  padding: 15px 20px;
}

.form-group {
  margin-bottom: 10px;
}

.form-label {
  display: block;
  font-weight: normal;
  margin-bottom: 8px;
  font-size: 16px;
}

.form-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  font-size: 16px;
  outline: none;
  border-radius: 2px;
}

.form-input:focus {
  border-color: var(--primary-color);
}

.password-field-wrap {
  position: relative;
}

.password-field-wrap .form-input {
  padding-right: 70px;
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #d4d4d4;
  background: #f7f7f7;
  color: #333;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.password-toggle-btn:hover {
  background: #ececec;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-auth {
  background-color: #f8f8f8;
  border: 1px solid #dcdcdc;
  padding: 10px 15px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 4px;
}

.btn-auth:hover {
  background-color: #eeeeee;
}

.forgot-password {
  float: right;
  font-size: 14px;
  color: var(--link-color);
  text-decoration: underline;
  font-weight: normal;
}

.forgot-password:hover {
  text-decoration: none;
}

.hcaptcha-mock-container {
  border: 1px solid #d3d3d3;
  background: #f9f9f9;
  border-radius: 3px;
  padding: 0 15px 0 15px;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 300px;
  height: 74px;
  margin-bottom: 15px;
  user-select: none;
}

.hcaptcha-checkbox {
  width: 28px;
  height: 28px;
  border: 2px solid #c1c1c1;
  background: white;
  margin-right: 12px;
  border-radius: 2px;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hcaptcha-checkbox.checked {
  background-color: white;
  border-color: #038dff;
}

.hcaptcha-checkbox.checked::after {
  content: "✓";
  color: #038dff;
  font-size: 24px;
  font-weight: bold;
}

.hcaptcha-text {
  font-size: 14px;
  color: #333;
  margin-right: 15px;
}

.hcaptcha-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-width: 50px;
  padding-right: 5px;
}

.hcaptcha-logo-box img {
  width: 24px;
  height: auto;
  display: block;
  margin-bottom: 0px;
}

.hcaptcha-logo-box span {
  font-size: 9px;
  color: #3b3b3b;
  display: block;
  font-weight: bolder;
}

.auth-footer-text {
  text-align: center;
  font-size: 15px;
  color: #666;
  margin-top: 0px;
}

.auth-footer-text a {
  color: var(--link-color);
  font-weight: bold;
  text-decoration: underline;
}

.auth-footer-text a:hover {
  text-decoration: none;
}

.hcaptcha-legal {
  font-size: 11px;
  color: #999;
  line-height: 1.4;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  text-align: left;
}

.hcaptcha-legal a {
  color: var(--link-color);
  text-decoration: none;
}

.turnstile-wrap {
  margin-bottom: 15px;
}

.turnstile-container {
  min-height: 65px;
}

.account-main {
  padding: 40px 0 40px;
}

.account-sub-nav {
  font-size: 14px;
}

.account-sub-nav a {
  color: #0000ee;
  text-decoration: none;
}

.account-sub-nav a:hover {
  text-decoration: underline;
}

.account-sub-nav .divider {
  margin: 0 5px;
  color: #a8a8a8;
}

.account-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #cfcfcf;
  padding: 12px 0;
  margin-bottom: 15px;
}

.account-menu {
  display: flex;
  gap: 12px;
  font-weight: bold;
  font-size: 16px;
  color: #a0a0a0;
}

.account-menu a {
  color: #0000ee;
  text-decoration: none;
  font-weight: normal;
}

.account-menu a:hover {
  text-decoration: underline;
  color: #000;
}

.account-balance-info {
  font-size: 15px;
  color: #333;
}

.account-balance-info strong {
  font-weight: bold;
}

/* Ads List Table Styles */
.ads-table-header {
  background: #f2f2f2;
  border-bottom: 1px solid #e1e1e1;
  display: flex;
  padding: 4px 15px;
  font-weight: bold;
  font-size: 15px;
  color: #333;
  text-align: left;
}

.ads-col-headline {
  flex: 1.5;
}
.ads-col-area {
  flex: 1;
}
.ads-col-category {
  flex: 1.5;
}
.ads-col-date {
  flex: 1;
}
.ads-col-status {
  flex: 1;
}
.ads-col-manage {
  flex: 1;
}

.ads-manage-section {
  padding: 10px 0;
  text-align: center;
  min-height: 80px;
}

.no-ads-msg {
  color: #666;
  font-size: 14px;
  margin-top: 15px;
}

.footer-divider {
  border: 0;
  border-top: 1px solid #e1e1e1;
  margin: 40px 0 15px 0;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .account-top-row,
  .account-actions-row,
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .account-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .ads-table-header {
    display: none; /* Hide complex table header on mobile */
  }

  .footer-right {
    justify-content: center;
  }
}
