/* ==================== VARIABLES CSS ==================== */
:root {
  --primary: #4A6FA5;
  --secondary: #3AB795;
  --accent: #FF7E5D;
  --light: #F7F9FA;
  --dark: #333333;
  --gray: #666666;
  --light-gray: #DDDDDD;
  --success: #2e7d32;
  --warning: #ed6c02;
  --error: #d32f2f;
  --premium: #FFD700;
  --premium-dark: #D4AF37;
}

/* ==================== RESET Y BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

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

/* ==================== COMPONENTES DE UI ==================== */

/* Header y Navegación */
.header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 15px 10px;
  border-radius: 15px;
  margin-bottom: 15px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.sticky-header.hide {
  transform: translateY(-100%);
}

.sticky-header .header-content {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Tabs y Navegación */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 25px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: var(--light);
  z-index: 10;
  padding-top: 10px;
}

.sticky-header .tabs {
  background-color: white;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 15px 25px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  font-weight: 600;
  font-size: 1rem;
  color: var(--gray);
  transition: all 0.3s ease;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.tab-content {
  display: none;
  padding: 20px 0;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards y Contenedores */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
  margin-right: 15px;
}

/* Formularios */
.form-container {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 40px;
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.2);
}

/* Botones */
.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn:hover {
  background-color: #3a5a8c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-secondary {
  background-color: #1877F2;
}

.btn-secondary:hover {
  background-color: #166fe5;
}

.btn-accent {
  background-color: var(--accent);
}

.btn-accent:hover {
  background-color: #e66a4a;
}

/* Indicadores */
.host-indicator, .admin-indicator {
  background: var(--secondary);
  color: white;
  padding: 8px 15px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-indicator {
  background: var(--accent);
}

/* Toast y Notificaciones */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--success);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toast.show {
  opacity: 1;
}

.toast.error {
  background-color: var(--error);
}

.toast.warning {
  background-color: var(--warning);
}

.toast.info {
  background-color: var(--primary);
}

/* Loading */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  flex-direction: column;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 5px solid var(--light-gray);
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Menú Móvil */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  padding: 8px;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1100;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1098;
}

.mobile-menu-overlay.active {
  display: block;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  z-index: 1099;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 15px 0;
}

.mobile-menu.active {
  left: 0;
}

.mobile-tab {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  border-bottom: 1px solid var(--light-gray);
  transition: background-color 0.3s;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.mobile-tab.active {
  color: var(--primary);
  border-left: 4px solid var(--primary);
  background-color: rgba(74, 111, 165, 0.05);
}

/* Avisos Legales */
.legal-notice {
  background-color: #fff8e1;
  border-left: 4px solid var(--warning);
  padding: 12px;
  margin-bottom: 15px;
  font-size: 0.8rem;
  border-radius: 0 4px 4px 0;
  color: #5c3b00;
  line-height: 1.4;
}

/* Contenido de Placeholder */
.content-placeholder {
  min-height: 200px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 20px;
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================== COMPONENTES ESPECÍFICOS ==================== */

/* Sistema de Rating */
.interactive-stars {
  display: flex;
  margin: 10px 0;
}

.interactive-star {
  color: var(--light-gray);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
  margin-right: 3px;
}

.interactive-star:hover,
.interactive-star.filled {
  color: #FFD700;
}

/* Botones de Host */
.host-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.host-btn {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
}

.host-btn.edit-btn {
  background: var(--secondary);
  color: white;
}

.host-btn.delete-btn {
  background: var(--error);
  color: white;
}

/* Acordeones */
.accordion {
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--light-gray);
}

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

.accordion-header {
  background-color: #f8f9fa;
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--dark);
  transition: background-color 0.3s;
}

.accordion-header:hover {
  background-color: #e9ecef;
}

.accordion-body {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-content {
  padding: 20px;
  line-height: 1.7;
}

.accordion-item.active .accordion-header {
  background-color: #e3f2fd;
}

.accordion-item.active .accordion-body {
  max-height: 500px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .tabs {
    display: none !important;
  }
  
  .sticky-header .tabs {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .cards-container, .public-guide-items, .services-container {
    grid-template-columns: 1fr;
  }
  
  .property-name {
    font-size: 1.8rem;
  }
  
  .property-subtitle {
    font-size: 0.9rem;
  }
  
  .property-location {
    font-size: 0.8rem;
  }
  
  .form-container, .guide-content, .property-info-container {
    padding: 20px;
  }
  
  .tab {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .property-name {
    font-size: 1.6rem;
  }
  
  .btn-large {
    padding: 14px 25px;
    font-size: 1rem;
  }
  
  .card {
    padding: 20px;
  }
}

/* ==================== UTILIDADES ==================== */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-title {
  font-size: 1.6rem;
  margin-bottom: 25px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-tag {
  display: inline-block;
  background: rgba(74, 111, 165, 0.1);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 10px;
}

/* Footer */
footer {
  margin-top: 50px;
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border-top: 1px solid #ddd;
}

footer .legal {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 10px;
}