/* Paleta de Cores (Inspirada em Manus/Gemini) */
:root {
  --color-background-main: #0F0F0F;
  --color-cards-sections: #1A1A1A;
  --color-borders: #2A2A2A;
  --color-text-primary: #E8E8E8;
  --color-text-secondary: #A0A0A0;
  --color-accents-primary: #6366F1;
  --color-accents-secondary: #10B981;
  --color-hover-states: #4F46E5;
  --color-warning: #F59E0B;
  --color-success: #10B981;
  --color-danger: #EF4444;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  background-color: #0F0F0F; /* Fallback */
  background-color: var(--color-background-main);
  color: #E8E8E8; /* Fallback */
  color: var(--color-text-primary);
  overflow-x: hidden;
}

/* Layout Geral */
.container-fluid {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .main-content {
    flex-direction: row;
  }
}

/* Header */
header {
  background-color: #1A1A1A; /* Fallback */
  background-color: var(--color-cards-sections);
  color: #E8E8E8; /* Fallback */
  color: var(--color-text-primary);
  padding: 15px 20px;
  border-bottom: 1px solid #2A2A2A; /* Fallback */
  border-bottom: 1px solid var(--color-borders);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

header .logo-unamidia {
  height: 40px;
}

.city-selector {
  position: relative;
}

.city-selector-btn {
  background-color: var(--color-accents-primary);
  color: var(--color-text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.city-selector-btn:hover {
  background-color: var(--color-hover-states);
  transform: translateY(-1px);
}

.city-selector-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 8px;
}

.city-options {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--color-cards-sections);
  border: 1px solid var(--color-borders);
  border-radius: 8px;
  padding: 8px 0;
  min-width: 180px;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-top: 5px;
}

.city-options.d-none {
  display: none;
}

.city-option {
  background: none;
  border: none;
  color: var(--color-text-primary);
  padding: 12px 20px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
}

.city-option:hover {
  background-color: var(--color-hover-states);
}

/* Hero Section */
.hero-section {
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-background-main) 0%, var(--color-cards-sections) 100%);
  border-bottom: 1px solid var(--color-borders);
}

.hero-section h1 {
  font-size: 3rem;
  color: var(--color-text-primary);
  margin-bottom: 15px;
  font-weight: 700;
  background: -webkit-linear-gradient(
    45deg,
    var(--color-accents-primary) 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #10b981 75%,
    var(--color-accents-primary) 100%
  );
  background: linear-gradient(
    45deg,
    var(--color-accents-primary) 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #10b981 75%,
    var(--color-accents-primary) 100%
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-animation: gradientShift 8s ease-in-out infinite;
  animation: gradientShift 8s ease-in-out infinite;
}

@-webkit-keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 0%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 100%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-section p {
  font-size: 1.3rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   NOVA ESTRUTURA - SEM MAPA FIXO
======================================== */

/* Seção de Anúncios Principal */
.ads-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

.ads-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
  flex-wrap: wrap;
}

.section-info h2 {
  color: var(--color-text-primary);
  font-size: 2rem;
  margin-bottom: 2px;
}

.section-info p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* Controles de Filtro */
.ads-controls {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 15px;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

/* Fallback para navegadores sem suporte a gap */
@supports not (gap: 15px) {
  .ads-controls > * + * {
    margin-left: 15px;
  }
}

.city-filter, .type-filter {
  position: relative;
}

.filter-btn {
  background-color: #1A1A1A; /* Fallback */
  background-color: var(--color-cards-sections);
  color: #E8E8E8; /* Fallback */
  color: var(--color-text-primary);
  border: 1px solid #2A2A2A; /* Fallback */
  border: 1px solid var(--color-borders);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  min-width: 140px;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}

/* Fallback para navegadores sem suporte a gap */
@supports not (gap: 8px) {
  .filter-btn > * + * {
    margin-left: 8px;
  }
}

.filter-btn:hover {
  border-color: var(--color-accents-primary);
  background-color: var(--color-borders);
}

.arrow-icon {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.3s ease;
}

.filter-btn[aria-expanded="true"] .arrow-icon {
  transform: rotate(180deg);
}

.filter-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-cards-sections);
  border: 1px solid var(--color-borders);
  border-radius: 8px;
  margin-top: 5px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-option {
  width: 100%;
  background: none;
  border: none;
  color: var(--color-text-primary);
  padding: 10px 15px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-option:hover {
  background-color: var(--color-borders);
}

.filter-option:first-child {
  border-radius: 8px 8px 0 0;
}

.filter-option:last-child {
  border-radius: 0 0 8px 8px;
}

/* Grid de Anúncios */
.ads-grid {
  /* Fallback para navegadores sem suporte a CSS Grid */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: 20px -10px 0;
  
  /* CSS Grid para navegadores modernos */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Fallback para cards em flexbox */
.ads-grid .ad-card {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 300px;
  flex: 1 1 300px;
  margin: 10px;
  max-width: calc(50% - 20px);
}

@supports (display: grid) {
  .ads-grid .ad-card {
    -webkit-box-flex: initial;
    -ms-flex: initial;
    flex: initial;
    margin: 0;
    max-width: none;
  }
}

/* 3 colunas em desktop */
@media (min-width: 1024px) {
  .ads-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 20px auto 0;
  }
  
  /* Fallback para flexbox em desktop */
  @supports not (display: grid) {
    .ads-grid .ad-card {
      max-width: calc(33.333% - 20px);
    }
  }
}

/* 2 colunas em tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .ads-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Fallback para flexbox em tablet */
  @supports not (display: grid) {
    .ads-grid .ad-card {
      max-width: calc(50% - 20px);
    }
  }
}

/* 1 coluna em mobile */
@media (max-width: 767px) {
  .ads-grid {
    grid-template-columns: 1fr;
  }
  
  /* Fallback para flexbox em mobile */
  @supports not (display: grid) {
    .ads-grid .ad-card {
      max-width: calc(100% - 20px);
    }
  }
}

.ad-card {
  background-color: #1A1A1A; /* Fallback */
  background-color: var(--color-cards-sections);
  border: 1px solid #2A2A2A; /* Fallback */
  border: 1px solid var(--color-borders);
  border-radius: 12px;
  overflow: hidden;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  cursor: pointer;
}

.ad-card:hover {
  -webkit-transform: translateY(-4px);
  transform: translateY(-4px);
  border-color: #6366F1; /* Fallback */
  border-color: var(--color-accents-primary);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

/* Cards de Anúncios com Tags sobre Imagens */
.ad-card-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.ad-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-transition: transform 0.3s ease;
  transition: transform 0.3s ease;
}

.ad-card:hover .ad-card-image {
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
}

.ad-card-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  z-index: 2;
}

.ad-card-tags .ad-tag {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ícones pequenos em cinza */
.icon {
  color: #888;
  font-size: 0.8rem;
  margin-right: 4px;
  opacity: 0.7;
}

.ad-card-address .icon {
  color: #888;
  margin-right: 6px;
}

.ad-stat-value .icon {
  color: var(--color-accents-primary);
  margin-right: 4px;
  font-size: 0.9rem;
}

.btn-details .icon,
.btn-select .icon {
  margin-right: 6px;
  font-size: 0.9rem;
}

.btn-details .icon {
  color: #888;
}

.btn-select .icon {
  color: inherit;
}

/* Melhorias nos cards */
.ad-card-content {
  padding: 20px;
}

.ad-card-title {
  color: var(--color-text-primary);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.ad-card-address {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.ad-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
  padding: 15px;
  background-color: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  border: 1px solid var(--color-borders);
}

.ad-stat {
  text-align: center;
}

.ad-stat-value {
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.ad-stat-label {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-details,
.btn-select {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-details {
  background-color: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-borders);
}

.btn-details:hover {
  background-color: var(--color-borders);
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

.btn-select {
  background-color: var(--color-accents-primary);
  color: white;
  border-color: var(--color-accents-primary);
}

.btn-select:hover {
  background-color: var(--color-hover-states);
  border-color: var(--color-hover-states);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Estilos dos botões principais já definidos acima */

/* Modal de Detalhes do Anúncio */
.ad-details-modal {
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  
  /* Remove scrollbars for clean modern design */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.ad-details-modal::-webkit-scrollbar {
  display: none; /* WebKit browsers (Chrome, Safari, Opera) */
}

.ad-details-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.ad-details-image-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.ad-details-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-details-tags {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 2;
}

.ad-details-tags .ad-tag {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-info-section h3 {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.ad-info-section p {
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ad-stats {
  margin-bottom: 4px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-borders);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.stat-value {
  color: var(--color-accents-primary);
  font-weight: 700;
}

.ad-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 4px;
  border-top: 1px solid var(--color-borders);
}

.ad-actions .btn-secondary,
.ad-actions .btn-primary {
  flex: 1;
  max-width: 200px;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Quando há apenas um botão, ocupa toda a largura */
.ad-actions .btn-primary.btn-large {
  max-width: none;
  width: 100%;
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative;
  background: linear-gradient(
    90deg,
    var(--color-accents-primary) 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #10b981 75%,
    var(--color-accents-primary) 100%
  );
  background-size: 200% 100%;
  animation: gradientMove 8s ease-in-out infinite;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.ad-actions .btn-primary.btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background-color: var(--color-borders);
  color: var(--color-text-primary);
  border: 1px solid var(--color-borders);
}

.btn-secondary:hover {
  background-color: var(--color-text-secondary);
  border-color: var(--color-text-secondary);
}

/* Modal de Detalhes do Anúncio - Título com efeito gradiente animado igual ao botão */
#modal-ad-title {
  background: linear-gradient(
    90deg,
    var(--color-accents-primary) 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #10b981 75%,
    var(--color-accents-primary) 100%
  );
  background-size: 200% 100%;
  animation: gradientMove 8s ease-in-out infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 25px;
  text-align: center;
}

/* Modal do Mapa */
.map-modal {
  max-width: 1200px; /* Aumentado de 900px */
  width: 95%;
  max-height: 85vh; /* Aumentado de 80vh */
}

#modal-map-container {
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-borders);
}

#modal-map {
  height: 100%;
  width: 100%;
}

/* Seleção de Duração dos Totems */
.duration-selection {
  text-align: center;
  margin-bottom: 30px;
}

.duration-selection h3 {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  margin-bottom: 25px;
}

.duration-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  max-width: 1200px; /* Aumentado de 900px */
  margin: 0 auto;
}

.duration-card {
  background-color: var(--color-cards-sections);
  border: 2px solid var(--color-borders);
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-align: left;
}

.duration-card:hover {
  border-color: var(--color-accents-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.duration-card.popular {
  border-color: var(--color-accents-primary);
  background: linear-gradient(135deg, var(--color-cards-sections) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.duration-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-borders);
  padding-bottom: 15px;
}

.duration-header h4 {
  color: var(--color-text-primary);
  font-size: 1.3rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.duration-price {
  color: var(--color-accents-primary);
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
}

.popular-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background-color: var(--color-accents-primary);
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
}

.duration-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.duration-benefits li {
  color: var(--color-text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--color-borders);
  position: relative;
  padding-left: 25px;
}

.duration-benefits li:last-child {
  border-bottom: none;
}

.duration-benefits li::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: var(--color-success);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 16px;
}

/* Footer */
footer {
  position: relative;
  background-color: var(--color-cards-sections);
  border-top: 1px solid var(--color-borders);
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
  overflow: hidden;
}

.footer-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--color-accents-primary) 0%,
    #8b5cf6 25%,
    #06b6d4 50%,
    #10b981 75%,
    var(--color-accents-primary) 100%
  );
  background-size: 200% 100%;
  animation: gradientMove 8s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.footer-accent::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  filter: blur(2px);
  opacity: 0.7;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes gradientMove {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.7;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

footer p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Responsividade para telas grandes */
@media (min-width: 1440px) {
  .duration-options {
    max-width: 1400px;
    gap: 30px;
  }
  
  .duration-card {
    padding: 30px;
  }
  
  .modal-content {
    max-width: 98vw;
    max-height: 98vh;
  }
}

/* Responsividade - Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  .duration-options {
    grid-template-columns: 1fr 1fr;
    max-width: 800px; /* Aumentado de 600px */
  }
}

/* Responsividade - Mobile/Telas Reduzidas */
@media (max-width: 768px) {
  body, html {
    overflow-x: hidden;
    width: 100%;
  }
  
  * {
    max-width: 100%;
  }
  
  .container-fluid,
  .main-content,
  .ads-section {
    width: 100%;
    overflow-x: hidden;
  }
  
  .ads-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .ads-controls {
    justify-content: center;
  }
  
  .ads-grid {
    grid-template-columns: 1fr;
    gap: 12px; /* Reduzido de 20px para 12px */
  }
  
  /* Aproximar elementos nos cards em mobile */
  .ad-card-content {
    padding: 15px; /* Reduzido de 20px para 15px */
  }
  
  .ad-card-title {
    margin-bottom: 6px; /* Reduzido de 10px para 6px */
    font-size: 1.1rem; /* Ligeiramente menor */
  }
  
  .ad-card-address {
    margin-bottom: 10px; /* Reduzido de 15px para 10px */
  }
  
  .ad-card-stats {
    margin-bottom: 10px; /* Reduzido de 15px para 10px */
    padding: 12px; /* Reduzido de 15px para 12px */
    gap: 8px; /* Reduzido de 10px para 8px */
  }
  
  .ad-details-content {
    grid-template-columns: 1fr;
    gap: 15px; /* Reduzido de 20px para 15px */
  }
  
  .ad-actions {
    flex-direction: column;
    padding-top: 8px; /* Reduzido de 12px para 8px */
  }
  
  .ad-actions .btn-secondary,
  .ad-actions .btn-primary {
    max-width: none;
  }

  .duration-options {
    grid-template-columns: 1fr;
    gap: 10px; /* Reduzido de 15px para 10px */
  }
  
  .duration-card {
    padding: 15px; /* Reduzido de 20px para 15px */
  }
  
  .popular-badge {
    right: 10px;
    top: -8px;
    font-size: 0.7rem;
    padding: 4px 10px;
  }
  
  /* Modal spacing adjustments for mobile */
  .modal-content {
    padding: 20px; /* Reduzido de 30px para 20px */
    max-height: 85vh; /* Garantir espaço adequado */
    margin: 20px; /* Adicionar margem para evitar cortes */
  }
  
  .ad-details-image-container {
    height: 250px; /* Reduzido de 300px para 250px */
    margin-bottom: 15px; /* Reduzido de 20px para 15px */
  }
  
  .ad-info-section h3 {
    margin-bottom: 6px; /* Reduzido de 10px para 6px */
  }
  
  .ad-info-section p {
    margin-bottom: 15px; /* Reduzido de 20px para 15px */
  }
  
  .ad-stats {
    margin-bottom: 2px; /* Reduzido ainda mais para modal mobile */
  }
  
  .stat-item {
    padding: 4px 0; /* Reduzido ainda mais para modal mobile */
  }
  
  /* Garantir que botões modais sejam sempre visíveis */
  .ad-actions {
    margin-top: 4px; /* Espaço ainda mais reduzido antes dos botões */
    padding-bottom: 10px; /* Espaço após os botões */
  }
  
  .ad-actions .btn-primary.btn-large {
    padding: 14px 20px; /* Padding otimizado para mobile */
    font-size: 1rem; /* Tamanho de fonte ajustado */
  }
}

/* Utilitários */
.d-none {
  display: none !important;
}

/* Responsividade */
@media (max-width: 767px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .hero-section {
    padding: 40px 20px;
  }

  .hero-section h1 {
    font-size: 2.2rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .condo-list {
    grid-template-columns: 1fr;
  }

  .plan-options {
    grid-template-columns: 1fr;
  }

  .bottom-bar-content {
    flex-direction: column;
    gap: 10px;
  }

  .form-container {
    padding: 25px;
  }

  .plans-container {
    padding: 0 10px;
  }
}

/* Mobile muito pequeno - otimização adicional para modais */
@media (max-width: 480px) {
  .modal-content {
    padding: 15px; /* Padding ainda menor */
    max-height: 80vh; /* Altura máxima reduzida */
    margin: 10px; /* Margem menor */
    border-radius: 8px; /* Border radius menor */
  }
  
  .ad-details-content {
    gap: 10px; /* Gap menor entre elementos */
  }
  
  .ad-details-image-container {
    height: 200px; /* Altura da imagem reduzida */
    margin-bottom: 10px;
  }
  
  .ad-info-section h3 {
    font-size: 1.2rem; /* Título menor */
    margin-bottom: 5px;
  }
  
  .ad-stats {
    margin-bottom: 2px;
  }
  
  .stat-item {
    padding: 3px 0; /* Padding ainda menor */
    font-size: 0.9rem;
  }
  
  .ad-actions {
    margin-top: 2px;
    padding-bottom: 15px; /* Padding inferior garantido */
  }
  
  .ad-actions .btn-primary.btn-large {
    padding: 12px 16px; /* Padding compacto */
    font-size: 0.95rem;
    border-radius: 8px;
  }
  
  /* Garantir que o modal não ultrapasse os limites da tela */
  .modal {
    padding: 10px;
    align-items: flex-start;
    padding-top: 20px;
  }
  
  /* Ajuste no modal close button */
  .modal-close {
    top: 10px;
    right: 15px;
    font-size: 20px;
  }
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.condo-item {
  animation: fadeIn 0.5s ease-out;
}

.plan-card {
  animation: fadeIn 0.5s ease-out;
}

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

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-borders);
  border-top: 2px solid var(--color-accents-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Sistema de Modais */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
  overflow-y: auto; /* Permitir scroll vertical */
  padding: 20px; /* Padding para evitar cortes nas bordas */
}

.modal-content {
  background-color: var(--color-cards-sections);
  border-radius: 12px;
  padding: 30px;
  max-width: 95vw; /* Aumentado de 90vw */
  max-height: 95vh; /* Aumentado de 90vh */
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--color-borders);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin: auto; /* Centralização automática */
  
  /* Remove scrollbars for clean modern design */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.modal-content::-webkit-scrollbar {
  display: none; /* WebKit browsers (Chrome, Safari, Opera) */
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--color-text-primary);
}

/* Formulário de Pagamento */
.payment-form {
  max-width: 600px;
}

.campaign-summary {
  background-color: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--color-accents-primary);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.campaign-summary h3 {
  color: var(--color-text-primary);
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-borders);
}

.summary-item:last-child {
  border-bottom: none;
  font-weight: 600;
  color: var(--color-accents-primary);
}

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

.form-group label {
  display: block;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--color-background-main);
  border: 1px solid var(--color-borders);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accents-primary);
}

.btn-primary {
  background-color: var(--color-accents-primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: var(--color-hover-states);
  transform: translateY(-1px);
}

.btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 1.1rem;
}

/* Mensagem de "sem anúncios" */
.no-ads {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  background-color: var(--color-cards-sections);
  border-radius: 12px;
  border: 1px solid var(--color-borders);
}

/* Seletor de Tempo para Totems */
.totem-time-selector {
  margin-bottom: 30px;
}

.time-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--color-cards-sections);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.time-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 15px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: var(--color-text-secondary);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.time-tab:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.time-tab.active {
  background: linear-gradient(135deg, var(--color-accents-primary), #8b5cf6);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.tab-label {
  font-size: 1rem;
  font-weight: 600;
}

.tab-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-accents-primary);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.time-tab.active .tab-badge {
  opacity: 1;
  transform: scale(1);
}

.economize-badge {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white !important;
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8);
  }
}

/* Animações para transição de preços */
.duration-price {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.duration-price.updating {
  transform: scale(0.8);
  opacity: 0.6;
}

/* Melhorar animação dos cards de duração */
.duration-card {
  background-color: var(--color-cards-sections);
  border: 2px solid var(--color-borders);
  border-radius: 12px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.duration-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s ease;
}

.duration-card:hover::before {
  left: 100%;
}

/* Responsividade para as abas */
@media (max-width: 600px) {
  .time-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .time-tab {
    padding: 12px 16px;
  }
  
  .tab-label {
    font-size: 0.9rem;
  }
  
  .tab-badge {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .totem-time-selector {
    margin-bottom: 20px;
  }
  
  .time-tabs {
    padding: 3px;
  }
  
  .time-tab {
    padding: 10px 12px;
    gap: 4px;
  }
}

