/* =========================================
   IDU IMÓVEIS — Componentes Reutilizáveis
   Cards, botões, campos, badges, etc.
   Referência: ai_studio_code.html
   ========================================= */

/* === HEADER & NAVEGAÇÃO === */
header {
  background-color: var(--white);
  padding: 15px 0;
  box-shadow: var(--shadow-header);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-purple);
  cursor: pointer;
  text-decoration: none;
}

.logo img {
  width: 150px;
}

.logo i {
  color: var(--primary-red);
  font-size: 28px;
  margin-right: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links ul {
  display: flex;
  gap: 30px;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 0;
  padding-left: 0;
}

.nav-links ul li a {
  transition: color var(--transition);
}

.nav-links ul li a:hover {
  color: var(--primary-red);
}

.nav-links ul li a.active {
  color: var(--primary-red);
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: var(--dark-purple);
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}

/* === BOTÕES === */
.login-btn {
  background-color: var(--primary-red);
  color: var(--white) !important;
  padding: 10px 25px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: 2px solid var(--primary-red);
  transition: all var(--transition);
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.login-btn svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  fill: var(--white);
}

.login-btn:hover {
  background-color: var(--primary-red-hover);
  border-color: var(--primary-red-hover);
}

.btn-entrar {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 10px 25px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  transition: background-color var(--transition);
  font-size: 14px;
  min-height: 44px;
}

.btn-entrar:hover {
  background-color: var(--primary-red-hover);
}

.btn-search {
  background-color: var(--dark-purple);
  color: var(--white);
  border: none;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color var(--transition);
  white-space: nowrap;
  min-height: 44px;
  font-size: 14px;
}

.btn-search:hover {
  background-color: var(--dark-purple-light);
}

.btn-fav {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--primary-red);
  transition: all var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-fav:hover {
  background: var(--primary-red-light);
  border-color: var(--primary-red);
}

.btn-fav.active {
  background: var(--primary-red);
  color: var(--white);
  border-color: var(--primary-red);
}

.btn-fav.active:hover {
  background: var(--primary-red-hover);
}

.btn-msg {
  flex: 1;
  background: var(--primary-red);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 8px 15px;
  transition: background-color var(--transition);
  min-height: 44px;
  font-size: 13px;
}

.btn-msg:hover {
  background-color: var(--primary-red-hover);
}

.btn-block {
  display: block;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 15px;
  border: none;
  font-size: 14px;
  transition: all var(--transition);
  min-height: 44px;
  text-align: center;
  cursor: pointer;
}

.btn-red {
  background: var(--primary-red);
  color: var(--white);
}

.btn-red:hover {
  background: var(--primary-red-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.btn-outline:hover {
  border-color: var(--text-dark);
  background: var(--light-bg);
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  right: 15px;
  top: 50%;
  margin-top: -9px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === FILTER PILLS === */
.filter-btn {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  min-height: 36px;
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--dark-purple);
}

.filter-btn.active {
  background: var(--dark-purple);
  color: var(--white);
  border-color: var(--dark-purple);
}

/* === CARDS DE IMÓVEIS === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

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

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

.card-content {
  padding: 15px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 15px;
}

.card-specs {
  display: flex;
  gap: 15px;
  font-size: 12px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.card-specs i {
  color: var(--primary-red);
  margin-right: 5px;
}

.card-price-label {
  font-size: 12px;
  color: var(--text-light);
}

.card-price {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.card-actions {
  display: flex;
  gap: 10px;
}

/* === SEARCH BOX === */
.search-box {
  background: var(--white);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 900px;
  padding: 10px;
  box-shadow: var(--shadow-search);
  z-index: 1;
}

.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding-left: 20px;
  margin-bottom: 15px;
}

.search-tabs span {
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  font-size: 14px;
}

.search-tabs span::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-red);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.search-tabs span.active {
  color: var(--primary-red);
}

.search-tabs span.active::after {
  transform: scaleX(1);
}

.search-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 10px 10px;
  gap: 15px;
  align-items: center;
}

.field-group:first-child {
  grid-column: span 3;
  border-right: none;
  border-bottom: 1px solid var(--border-color);
}

.field-group {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  padding-right: 15px;
}

.field-group:last-of-type {
  border-right: none;
}

.field-group label {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.input-wrapper i {
  color: #aaa;
  flex-shrink: 0;
}

.input-wrapper input,
.input-wrapper select {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-dark);
}

input::placeholder {
  color: var(--text-light);
}

/* Override Bootstrap 5 .placeholder utility (grey bg) — not used in our design */
.placeholder,
.placeholder-text {
  background-color: transparent !important;
  opacity: 1 !important;
  cursor: default;
}

/* === GEOLOCATION BUTTON === */
.btn-geolocation {
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text-light);
  font-size: 16px;
  transition: color 0.2s, transform 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  min-width: 36px;
  min-height: 36px;
}

.btn-geolocation:hover {
  color: var(--primary-red);
  background: var(--primary-red-light);
}

.btn-geolocation.loading {
  pointer-events: none;
  color: var(--primary-red);
}

/* === AUTOCOMPLETE LIST (Google Places enhanced) === */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 1060;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px 0;
  list-style: none;
}

.autocomplete-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-item i {
  color: var(--primary-red);
  font-size: 12px;
  flex-shrink: 0;
}

.autocomplete-item:hover {
  background: var(--primary-red-light);
  color: var(--primary-red);
}

@media (max-width: 768px) {
  .autocomplete-item {
    padding: 12px 14px;
    font-size: 16px;
  }

  .btn-geolocation {
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
  }
}

/* === TAGS / BADGES === */
.tags {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  z-index: 2;
}

.tag {
  padding: 5px 15px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--white);
  color: var(--text-dark);
}

.tag.venda {
  background: var(--primary-red);
  color: var(--white);
}

.tag.aluguel {
  background: var(--dark-purple);
  color: var(--white);
}

.tag.destaque {
  background: var(--white);
  color: var(--text-dark);
}

/* === PRICE CARD === */
.price-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius-md);
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-price);
}

.price-card .price-label {
  color: var(--text-light);
  font-size: 12px;
}

.price-card .price-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  font-size: 14px;
}

.info-row span:first-child {
  color: var(--text-light);
}

.info-row span:last-child {
  font-weight: 500;
}

/* === BROKER INFO === */
.broker-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.broker-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.broker-info .broker-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.broker-info .broker-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.broker-info .broker-creci {
  font-size: 10px;
  color: var(--text-light);
}

/* === FEATURES GRID === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  font-size: 13px;
  margin: 20px 0;
}

.features-grid i {
  color: var(--primary-red);
  margin-right: 8px;
}

.features-grid .feature-item {
  display: flex;
  align-items: center;
}

.features-grid .feature-item i.fa-check {
  color: var(--success);
}

/* === LEGAL PAGE === */
.legal-page {
  padding: 50px 0;
}

.legal-box {
  background: var(--white);
  padding: 50px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-legal);
}

.legal-box h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

.legal-box p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 15px;
  text-align: justify;
}

/* === ABOUT PAGE === */
.about-page-wrapper {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 20px;
}

.about-text {
  padding: 60px;
  flex: 1;
}

.about-image-bg {
  flex: 1;
  /* mesma imagem institucional usada na home (.about-wrapper) */
  background-image: url('/img/idu-img-institucional.jpeg');
  background-size: cover;
  background-position: center;
  min-height: 400px;
}

.logo-text {
  color: var(--primary-red);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

/* === FOOTER === */
footer {
  background-color: var(--dark-purple);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 40px;
  margin-bottom: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  gap: 10px;
}

.footer-logo img {
  max-width: 200px;
}

.footer-grid p {
  font-size: 13px;
  color: #ccc;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-col ul {
  padding-left: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #ccc;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--white);
}

.app-btn {
  background: #000;
  border: 1px solid #333;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 10px;
  margin-bottom: 10px;
  width: 100%;
  transition: background var(--transition);
  text-decoration: none;
}

.app-btn:hover {
  background: #222;
}

.app-btn i {
  font-size: 20px;
}

.app-btn strong {
  font-size: 14px;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg,
.empty-state img {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.empty-state p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* === LIGHTBOX === */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 30px;
  cursor: pointer;
  z-index: 10001;
  min-width: 44px;
  min-height: 44px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white);
  font-size: 24px;
  padding: 15px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: 44px;
  transition: background var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
}

/* === FORM COMPONENTS === */
.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--text-dark);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--primary-red);
  outline: none;
}

.form-field .error-message {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  display: none;
}

.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--error);
}

.form-field.has-error .error-message {
  display: block;
}

.form-field.has-success input {
  border-color: var(--success);
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
}

/* Strength meter */
.strength-meter {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin-top: 8px;
  overflow: hidden;
}

.strength-meter .strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition), background var(--transition);
  width: 0;
}

.strength-meter .strength-bar.weak {
  width: 33%;
  background: var(--error);
}

.strength-meter .strength-bar.medium {
  width: 66%;
  background: var(--warning);
}

.strength-meter .strength-bar.strong {
  width: 100%;
  background: var(--success);
}

/* === ACCORDION (FAQ) === */
.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-legal);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  transition: background var(--transition);
  min-height: 44px;
}

.faq-question:hover {
  background: var(--light-bg);
}

.faq-question .faq-icon {
  font-size: 18px;
  transition: transform var(--transition);
  color: var(--primary-red);
  flex-shrink: 0;
}

.faq-item.active .faq-question .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 20px 20px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

/* === AUTH PAGES === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 40px 20px;
}

.auth-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 450px;
}

.auth-card h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 30px;
}

.auth-card .auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-card .auth-links a {
  color: var(--primary-red);
  font-weight: 500;
}

.auth-card .auth-links a:hover {
  text-decoration: underline;
}

/* Override Bootstrap .btn-primary in auth context */
.auth-card .btn-primary,
.auth-page .btn-primary,
#buttonLogin {
  background-color: var(--primary-red) !important;
  border-color: var(--primary-red) !important;
  color: var(--white) !important;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

.auth-card .btn-primary:hover,
.auth-page .btn-primary:hover,
#buttonLogin:hover {
  background-color: var(--primary-red-hover) !important;
  border-color: var(--primary-red-hover) !important;
}

/* === AUTOCOMPLETE === */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0;
}

.autocomplete-list li {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--transition);
}

.autocomplete-list li:hover,
.autocomplete-list li.highlighted {
  background: var(--light-bg);
}

.autocomplete-list li mark {
  background: var(--primary-red-light);
  color: var(--primary-red);
  font-weight: 600;
  padding: 0;
}

/* === MEDIA QUERIES === */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  /* Header & Menu */
  .mobile-menu-btn {
    display: block;
  }

  .login-btn.logged {
    background-color: transparent;
    border-color: transparent;
    padding: 10px 10px;
  }

  .login-btn.logged svg {
    margin-right: 0;
    width: 24px;
    height: 24px;
    fill: var(--dark-purple);
  }

  .login-btn.logged span {
    display: none;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links ul {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 0;
  }

  .nav-links ul li {
    padding: 10px 0;
  }

  .btn-entrar {
    width: 100%;
    text-align: center;
  }

  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Search */
  .search-fields {
    display: flex;
    flex-direction: column;
  }

  .field-group {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    padding-right: 0;
    width: 100%;
    margin-bottom: 10px;
  }

  .btn-search {
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  /* About */
  .about-page-wrapper {
    flex-direction: column;
  }

  .about-text {
    padding: 30px;
  }

  .about-image-bg {
    height: 300px;
    min-height: 300px;
  }

  /* Legal */
  .legal-box {
    padding: 20px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

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

  /* Features */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Auth */
  .auth-card {
    padding: 25px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 20px;
  }

  .search-box {
    width: 95%;
    padding: 8px;
    margin-bottom: -160px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* === MOBILE MODAL (PHP-generated #mobileModal) === */
#mobileModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

#mobileModal .modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 320px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#mobileModal .menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition);
}

#mobileModal .menu-item:hover {
  background-color: var(--light-bg);
}

#mobileModal .menu-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

#mobileModal br {
  display: none;
}

/* === CUSTOM SELECT DROPDOWN === */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-wrapper select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  user-select: none;
  min-height: 44px;
  box-sizing: border-box;
}

.custom-select-trigger:hover {
  border-color: var(--primary-red);
}

.custom-select-trigger:focus,
.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px var(--primary-red-light);
  outline: none;
}

.custom-select-trigger.disabled {
  background: #f5f5f5;
  color: var(--text-light);
  cursor: not-allowed;
  border-color: var(--border-color);
}

.custom-select-trigger.disabled:hover {
  border-color: var(--border-color);
}

.custom-select-trigger .cs-icon {
  margin-right: 10px;
  color: var(--text-light);
  font-size: 14px;
  flex-shrink: 0;
}

.custom-select-trigger .cs-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-trigger .cs-text-placeholder {
  color: var(--text-light);
}

.custom-select-trigger .cs-arrow {
  margin-left: 10px;
  font-size: 10px;
  color: var(--text-light);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.custom-select-wrapper.open .cs-arrow {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 1050;
  max-height: 250px;
  overflow-y: auto;
  display: none;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.custom-select-wrapper.open .custom-select-options {
  display: block;
  animation: csDropIn 0.2s ease;
}

@keyframes csDropIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-options::-webkit-scrollbar {
  width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.custom-select-option {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-dark);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-option:hover {
  background: var(--primary-red-light);
  color: var(--primary-red);
}

.custom-select-option.selected {
  background: var(--primary-red);
  color: var(--white);
  font-weight: 600;
}

.custom-select-option.selected:hover {
  background: var(--primary-red-hover);
  color: var(--white);
}

/* Search box context: trigger inherits field-group styling */
.search-fields .custom-select-trigger,
.field-group .custom-select-trigger {
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: auto;
  background: transparent;
}

.search-fields .custom-select-trigger:focus,
.search-fields .custom-select-wrapper.open .custom-select-trigger {
  box-shadow: none;
  border: none;
}

.search-fields .custom-select-options {
  min-width: 220px;
}

/* Buscar sidebar context */
.localizacao .custom-select-trigger {
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  min-height: 44px;
  background: var(--white);
}

.localizacao .custom-select-trigger:focus,
.localizacao .custom-select-wrapper.open .custom-select-trigger {
  box-shadow: 0 0 0 3px var(--primary-red-light);
  border-color: var(--primary-red);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .custom-select-options {
    max-height: 200px;
  }

  .custom-select-trigger {
    min-height: 48px;
    font-size: 16px;
  }

  .custom-select-option {
    padding: 12px 14px;
    font-size: 16px;
  }
}