@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #0b0f13;
  --bg-darker: #07090c;
  --bg-card: rgba(17, 22, 26, 0.65);
  --primary-color: #00a4ed;
  --primary-glow: rgba(0, 164, 237, 0.3);
  --accent-color: #7b2cbf;
  --accent-glow: rgba(123, 44, 191, 0.3);
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 164, 237, 0.3);
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --gradient-brand: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  --gradient-glow: linear-gradient(135deg, rgba(0, 164, 237, 0.15) 0%, rgba(123, 44, 191, 0.15) 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background glowing circles */
body::before, body::after {
  content: '';
  position: fixed;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
}

body::before {
  top: -10%;
  right: -5%;
  background: var(--primary-color);
}

body::after {
  bottom: -10%;
  left: -5%;
  background: var(--accent-color);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Header & Logo */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 164, 237, 0.2));
  transition: var(--transition-smooth);
}

.logo-img:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 15px rgba(0, 164, 237, 0.4));
}

.brand-text {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--text-main);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 164, 237, 0.5), 0 0 0 3px rgba(0, 164, 237, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

/* Page Intro */
.intro-section {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem auto;
}

.intro-section h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.intro-section h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-section p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Search and Filters */
.search-filter-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-box-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.25rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dark);
  font-size: 1.25rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3.25rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1.05rem;
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 164, 237, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.filters-wrapper {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dark);
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.5rem 1.15rem;
  border-radius: 30px;
  font-family: var(--font-family);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--text-dark);
}

.filter-btn.active {
  background: var(--gradient-brand);
  color: var(--text-main);
  border-color: transparent;
  box-shadow: 0 4px 10px var(--primary-glow);
}

/* Grid layout */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  position: relative;
}

/* Business Card Premium Styles */
.business-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.business-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--gradient-card);
  z-index: 1;
  pointer-events: none;
}

.business-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(0, 164, 237, 0.15), 0 4px 25px rgba(0, 0, 0, 0.25);
}

/* Glow ring under card on hover */
.business-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: var(--gradient-brand);
  border-radius: 20px;
  z-index: -1;
  opacity: 0;
  transition: var(--transition-smooth);
}

.business-card:hover::after {
  opacity: 0.3;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  z-index: 2;
}

.logo-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.placeholder-logo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-brand);
  color: var(--text-main);
  border-radius: 12px;
}

.title-info {
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.card-body {
  margin-bottom: 1.75rem;
  z-index: 2;
  flex-grow: 1;
}

.card-services {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-message-snippet {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid var(--accent-color);
  padding: 0.75rem 1rem;
  border-radius: 0 10px 10px 0;
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  z-index: 2;
}

.contact-badge {
  font-size: 0.82rem;
  color: var(--text-dark);
}

.contact-badge strong {
  color: var(--text-main);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.action-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.action-icon:hover {
  background: var(--gradient-brand);
  color: var(--text-main);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 164, 237, 0.25);
}

.action-icon.whatsapp-btn:hover {
  background: #25d366;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.35);
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0d1217;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 10px;
}

.close-modal-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  transform: rotate(90deg);
}

/* Detalle de Negocio */
.detail-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.detail-logo-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.detail-title h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.detail-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.detail-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.detail-message {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1) 0%, rgba(0, 164, 237, 0.05) 100%);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-color);
  padding: 1.25rem 1.5rem;
  border-radius: 0 16px 16px 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-main);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.detail-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.contact-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-item-icon {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.contact-item-text {
  display: flex;
  flex-direction: column;
}

.contact-item-label {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.contact-item-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  word-break: break-all;
}

.contact-item-value[href]:hover {
  color: var(--primary-color);
}

.detail-footer-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-footer-actions .btn {
  flex: 1;
  justify-content: center;
}

/* Formulario - Modal */
.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-label span {
  color: #ff4a4a;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary-color);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 164, 237, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.logo-upload-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.logo-upload-box:hover {
  border-color: var(--primary-color);
  background: rgba(0, 164, 237, 0.03);
}

.logo-upload-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.logo-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-upload-text {
  display: flex;
  flex-direction: column;
}

.logo-upload-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.logo-upload-desc {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.logo-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-dark);
  font-size: 0.9rem;
  margin-top: 4rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer a:hover {
  color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .intro-section h1 {
    font-size: 2.25rem;
  }
  
  header {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
  }
  
  .header-actions {
    width: 100%;
  }
  
  .header-actions .btn {
    flex: 1;
    justify-content: center;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
}

/* Admin Dashboard Specific Styles */
#adminDashboardSection table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-dark);
}

#adminDashboardSection table tr {
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

#adminDashboardSection table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

#adminDashboardSection table td {
  padding: 1rem;
  vertical-align: middle;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

.status-badge.active {
  background: rgba(37, 211, 102, 0.08);
  border-color: rgba(37, 211, 102, 0.2);
  color: #25d366;
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 12px;
}

.user-badge-name {
  font-size: 0.88rem;
  font-weight: 700;
}

.user-badge-role {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.03em;
}

.dropdown-user {
  position: relative;
  display: inline-block;
}

.dropdown-user-content {
  display: none;
  position: absolute;
  right: 0;
  top: 105%;
  background: #0d1217;
  border: 1px solid var(--border-color);
  min-width: 180px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 12px;
  z-index: 50;
  overflow: hidden;
}

.dropdown-user-content button {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.dropdown-user-content button:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
}

.dropdown-user:hover .dropdown-user-content {
  display: block;
}

