.amw-widget-container {
  width: 100%;
}

.amw-widget {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.amw-left,
.amw-right {
  flex: 1 1 50%;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.amw-map {
  width: 100%;
  height: 100%;
  min-height: 600px;
  z-index: 1;
}

.amw-right {
  padding: 24px;
  background: #f8f9f8;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Full width layout when map is hidden */
.amw-widget-container.amw-no-map .amw-widget {
  display: block;
}

.amw-widget-container.amw-no-map .amw-right.amw-full-width {
  flex: 1 1 100%;
  min-height: auto;
  width: 100%;
}

.amw-search-input {
  padding: 10px 16px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 24px;
}

/* Default grid layout (with map) - 2 columns */
.amw-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex-grow: 1;
}

/* 3×3 grid layout (without map) - FORCE this to work */
.amw-widget-container.amw-no-map .amw-list-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
}

/* Default card style (with map) */
.amw-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.amw-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.amw-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.amw-card-content {
  padding: 12px 16px;
  flex-grow: 1;
}

.amw-card-content h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.amw-card-content p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #555;
}

/* Horizontal card style (without map) - 3×3 grid - FORCE this to work */
.amw-widget-container.amw-no-map .amw-card {
  flex-direction: row !important;
  min-height: 140px !important;
  padding: 20px !important;
  gap: 16px !important;
  align-items: center !important;
}

.amw-widget-container.amw-no-map .amw-card img {
  width: 70px !important;
  height: 70px !important;
  border-radius: 10px !important;
  object-fit: contain !important;
  background: #f8f9f8 !important;
  padding: 8px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.amw-widget-container.amw-no-map .amw-card-content {
  padding: 0 !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 70px !important;
}

.amw-widget-container.amw-no-map .amw-card-content h4 {
  font-size: 1.1rem !important;
  margin-bottom: 6px !important;
  color: #1b5e20 !important;
  line-height: 1.3 !important;
}

.amw-widget-container.amw-no-map .amw-card-content p {
  margin: 2px 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

.amw-widget-container.amw-no-map .amw-card-content p:first-of-type {
  color: #666 !important;
  font-weight: 500 !important;
}

.amw-widget-container.amw-no-map .amw-card-content p:last-of-type {
  color: #888 !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
  font-size: 0.8rem !important;
}

.amw-placeholder {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.amw-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}

.amw-pagination button {
  background: #1b5e20;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: background 0.2s;
}

.amw-pagination button:hover {
  background: #2e7d32;
}

.amw-pagination .amw-page-info {
  font-weight: 600;
}

/* Custom Marker Styles */
.amw-marker-active {
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.8));
  animation: amw-pin-pulse 1.5s infinite;
}

@keyframes amw-pin-pulse {
  0% {
    filter: drop-shadow(0 0 0 rgba(255, 87, 34, 0.6));
  }
  70% {
    filter: drop-shadow(0 0 10px rgba(255, 87, 34, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 87, 34, 0.6));
  }
}

/* Detail Card Styles - Appears below the widget */
.amw-detail-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  margin-top: 30px;
  padding: 0;
  overflow: hidden;
  animation: amw-detail-appear 0.4s ease-out;
  border: 1px solid #e0e0e0;
  position: relative;
}

@keyframes amw-detail-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.amw-detail-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #1b5e20;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.amw-detail-close:hover {
  background: #2e7d32;
}

.amw-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  padding: 30px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #f8f9f8 0%, #e8f5e8 100%);
  position: relative;
}

.amw-detail-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 12px;
  background: white;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.amw-detail-title {
  flex: 1;
}

.amw-detail-title h3 {
  margin: 0 0 12px 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1b5e20;
}

.amw-detail-subtitle {
  margin: 0;
  font-size: 1.2rem;
  color: #666;
  font-weight: 500;
  line-height: 1.4;
}

.amw-detail-content {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.amw-detail-left,
.amw-detail-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.amw-detail-section {
  margin-bottom: 0;
}

.amw-detail-section h4 {
  margin: 0 0 15px 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1b5e20;
  border-bottom: 2px solid #e8f5e8;
  padding-bottom: 8px;
}

.amw-detail-section p {
  margin: 0;
  line-height: 1.7;
  color: #555;
  font-size: 1rem;
}

.amw-detail-apresentacao {
  line-height: 1.7;
  color: #555;
  font-size: 1rem;
}

/* List Styles */
.amw-detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.amw-detail-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  line-height: 1.5;
  position: relative;
  padding-left: 20px;
}

.amw-detail-list li:before {
  content: "•";
  color: #1b5e20;
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 8px;
}

.amw-detail-list li:last-child {
  border-bottom: none;
}

/* Contact Section Styles */
.amw-contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.amw-contact-item {
  padding: 0;
  background: transparent;
  border-radius: 0;
  border-left: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.amw-contact-item strong {
  color: #1b5e20;
  display: block;
  min-width: 80px;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.5;
}

.amw-contact-item p {
  margin: 0;
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
  flex: 1;
}

.amw-contact-item a {
  color: #1b5e20;
  text-decoration: none;
  transition: color 0.2s;
}

.amw-contact-item a:hover {
  color: #2e7d32;
  text-decoration: underline;
}

/* Hide empty contact items */
.amw-contact-item:has(p:empty) {
  display: none;
}

/* Responsive */
@media (max-width: 1200px) {
  .amw-widget-container.amw-no-map .amw-list-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 968px) {
  .amw-detail-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 25px;
  }
  
  .amw-detail-left,
  .amw-detail-right {
    gap: 20px;
  }
  
  .amw-widget-container.amw-no-map .amw-list-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

@media (max-width: 768px) {
  .amw-detail-header {
    flex-direction: column;
    text-align: center;
    padding: 25px 20px 20px;
    gap: 20px;
  }
  
  .amw-detail-logo {
    align-self: center;
  }
  
  .amw-detail-title h3 {
    font-size: 1.6rem;
  }
  
  .amw-detail-subtitle {
    font-size: 1.1rem;
  }
  
  .amw-detail-content {
    padding: 20px;
  }
  
  .amw-detail-section h4 {
    font-size: 1.2rem;
  }
  
  .amw-detail-close {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    width: auto;
    display: block;
  }
  
  .amw-contact-info {
    gap: 10px;
  }
  
  .amw-contact-item {
    flex-direction: column;
    gap: 5px;
  }
  
  .amw-contact-item strong {
    min-width: auto;
  }
  
  /* Mobile styles for horizontal cards */
  .amw-widget-container.amw-no-map .amw-card {
    flex-direction: row !important;
    text-align: left !important;
    gap: 12px !important;
    padding: 16px !important;
  }
  
  .amw-widget-container.amw-no-map .amw-card img {
    width: 60px !important;
    height: 60px !important;
  }
  
  .amw-widget-container.amw-no-map .amw-card-content h4 {
    font-size: 1rem !important;
  }
  
  .amw-widget-container.amw-no-map .amw-card-content p {
    font-size: 0.8rem !important;
  }
}

@media (max-width: 480px) {
  .amw-widget-container.amw-no-map .amw-card {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
    padding: 16px !important;
  }
  
  .amw-widget-container.amw-no-map .amw-card img {
    width: 50px !important;
    height: 50px !important;
    align-self: center !important;
  }
}