/* ============================================
   COLOCATION PAGE STYLES
   ============================================ */

/* Hero Section */
.colocation-hero {
  background-image: url('P1.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding: calc(90px + var(--spacing-3xl)) 0 var(--spacing-3xl);
  margin-top: 0;
  margin-bottom: var(--spacing-2xl);
  position: relative;
  overflow: hidden;
}

.colocation-hero::before {
  display: none;
}

.colocation-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-30px, -30px) scale(1.1);
  }
}

.colocation-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.colocation-hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.3);
}

.colocation-hero-subtitle {
  font-size: 1.25rem;
  opacity: 1;
  line-height: 1.7;
  margin-bottom: var(--spacing-xl);
  text-shadow: 
    0 1px 6px rgba(0, 0, 0, 0.35),
    0 1px 3px rgba(0, 0, 0, 0.25);
  font-weight: 500;
  color: #ffffff;
}

/* Hero Button Enhancement */
.colocation-hero .btn-hero-cta {
  font-size: 1.125rem;
  font-weight: 700;
  padding: 18px 40px;
  border-radius: 16px;
  box-shadow: 
    0 0 30px rgba(0, 0, 0, 0.5),
    0 10px 30px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
}

.colocation-hero .btn-hero-cta:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 0 40px rgba(0, 0, 0, 0.6),
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .colocation-hero {
    padding: calc(90px + var(--spacing-3xl)) 0 var(--spacing-3xl);
  }
  
  .colocation-hero-title {
    font-size: 4rem;
  }
  
  .colocation-hero-subtitle {
    font-size: 1.5rem;
  }
  
  .colocation-hero .btn-hero-cta {
    font-size: 1.25rem;
    padding: 20px 48px;
  }
}

/* Filters Section */
.colocation-filters-section {
  margin-bottom: var(--spacing-2xl);
  margin-top: calc(-1 * var(--spacing-xl));
  position: relative;
  z-index: 10;
}

.colocation-filters {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: var(--spacing-xl);
  border-radius: 24px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  border: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: visible;
}

.colocation-filters::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  border-radius: 24px 24px 0 0;
  z-index: 1;
}

@media (min-width: 768px) {
  .colocation-filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }
}

.filter-group {
  flex: 1;
  min-width: 140px;
  max-width: 200px;
}

.filter-group.filter-actions {
  flex: 0 0 auto;
  min-width: auto;
  max-width: none;
  display: flex;
  gap: var(--spacing-sm);
  flex-direction: row;
  align-items: flex-end;
}

@media (min-width: 1024px) {
  .filter-group {
    min-width: 160px;
    max-width: 220px;
  }
}

@media (max-width: 1023px) {
  .filter-group.filter-actions {
    flex: 1 1 100%;
    width: 100%;
    margin-top: var(--spacing-sm);
  }
}

.filter-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: var(--spacing-xs);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  background: var(--color-white);
  color: var(--color-gray-900);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.filter-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px;
  padding-right: 42px;
}

.filter-input:hover,
.filter-select:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
  background: #ffffff;
}

.filter-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-direction: row;
  align-items: flex-end;
}

.btn-filter,
.btn-clear {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  white-space: nowrap;
  min-width: 100px;
}

.filter-group.filter-actions .btn-filter,
.filter-group.filter-actions .btn-clear {
  flex: 1;
  min-width: 90px;
}

@media (max-width: 767px) {
  .filter-group.filter-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-group.filter-actions .btn-filter,
  .filter-group.filter-actions .btn-clear {
    width: 100%;
  }
}

.btn-filter {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  box-shadow: 
    0 4px 16px rgba(37, 99, 235, 0.25),
    0 2px 8px rgba(37, 99, 235, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-filter::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-filter:hover::before {
  left: 100%;
}

.btn-filter:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 24px rgba(37, 99, 235, 0.35),
    0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-clear {
  background-color: var(--color-white);
  color: var(--color-gray-700);
  border: 2px solid var(--color-gray-200);
}

.btn-clear:hover {
  background-color: var(--color-gray-50);
  border-color: var(--color-gray-300);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Colocation Grid */
.colocation-section {
  margin-bottom: var(--spacing-3xl);
}

.colocation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 640px) {
  .colocation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .colocation-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Colocation Card */
.colocation-card {
  background: var(--color-white);
  border-radius: 24px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.06),
    0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
  cursor: pointer;
}

.colocation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.colocation-card:hover::before {
  opacity: 1;
}

.colocation-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08),
    0 0 0 2px rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.4);
}

.colocation-card-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
  position: relative;
  border-radius: 24px 24px 0 0;
}

.colocation-card-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
  pointer-events: none;
}

.colocation-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.colocation-card:hover .colocation-card-image img {
  transform: scale(1.12);
}

/* Responsive: Mobile - Smaller image height */
@media (max-width: 767px) {
  .colocation-card-image {
    height: 260px;
  }
}

.colocation-card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.colocation-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.colocation-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-white);
  flex-shrink: 0;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 0 0 2px rgba(37, 99, 235, 0.1);
  transition: all 0.3s ease;
}

.colocation-card:hover .colocation-card-avatar {
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(37, 99, 235, 0.2);
  transform: scale(1.05);
}

.colocation-card-info {
  flex: 1;
  min-width: 0;
}

.colocation-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 2px 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.colocation-card-age {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin: 0;
}

.colocation-card-badges {
  display: none; /* Hidden in card, visible in modal */
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.colocation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.colocation-badge:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.colocation-badge-icon {
  font-size: 0.875rem;
  opacity: 0.7;
}

.colocation-card-description {
  display: none; /* Hidden in card, visible in modal */
  font-size: 0.9375rem;
  color: var(--color-gray-700);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.colocation-card-footer {
  display: none; /* Hidden in card, visible in modal */
  padding: 18px 22px;
  border-top: 1px solid #f1f5f9;
  background: linear-gradient(to bottom, #fafbfc 0%, #ffffff 100%);
}

.btn-whatsapp-coloc {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.9375rem;
  font-weight: 700;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 
    0 4px 16px rgba(37, 211, 102, 0.3),
    0 2px 8px rgba(37, 211, 102, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp-coloc::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-whatsapp-coloc:hover::before {
  left: 100%;
}

.btn-whatsapp-coloc::after {
  content: "💬";
  font-size: 1.125rem;
  position: relative;
  z-index: 1;
}

.btn-whatsapp-coloc:hover {
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 24px rgba(37, 211, 102, 0.4),
    0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Empty State */
.colocation-empty {
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-lg);
}

.empty-state-content {
  max-width: 500px;
  margin: 0 auto;
  padding: var(--spacing-2xl);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.empty-icon {
  font-size: 5rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

.empty-state-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.02em;
}

.empty-state-content p {
  font-size: 1.125rem;
  color: var(--color-gray-600);
  line-height: 1.7;
}

/* Success Message */
.success-message {
  position: fixed;
  top: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  background-color: #10b981;
  color: var(--color-white);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--spacing-md);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 24px;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.3),
    0 15px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
  border-radius: 24px 24px 0 0;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  border-bottom: 1px solid var(--color-gray-200);
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-gray-500);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-900);
}

.modal-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  background: var(--color-white);
  color: var(--color-gray-900);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px;
  padding-right: 42px;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
  background: #ffffff;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

.modal-actions {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}

.btn-submit,
.btn-cancel {
  flex: 1;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-submit {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  box-shadow: 
    0 4px 16px rgba(37, 99, 235, 0.25),
    0 2px 8px rgba(37, 99, 235, 0.15);
  position: relative;
  overflow: hidden;
  font-weight: 700;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  transform: translateY(-3px);
  box-shadow: 
    0 8px 24px rgba(37, 99, 235, 0.35),
    0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-cancel {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
}

.btn-cancel:hover {
  background-color: var(--color-gray-200);
}

/* Modal Content Large */
.modal-content-large {
  max-width: 700px;
}

/* Form Row (for side-by-side inputs) */
.form-row {
  display: flex;
  gap: var(--spacing-md);
}

.form-group-half {
  flex: 1;
}

@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
  }
}

/* Photo Upload */
.photo-upload-container {
  position: relative;
}

.photo-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.photo-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  border: 2px dashed var(--color-gray-300);
  border-radius: 16px;
  background: var(--color-gray-50);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.photo-upload-label:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.photo-upload-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.photo-upload-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: var(--spacing-xs);
}

.photo-upload-hint {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}

.photo-preview-container {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto var(--spacing-md);
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid var(--color-gray-200);
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.photo-remove:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* Districts Dropdown */
.districts-dropdown {
  position: relative;
  width: 100%;
  overflow: visible;
  z-index: 10005;
}

.districts-dropdown-toggle {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  background: var(--color-white);
  color: var(--color-gray-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

.districts-dropdown-toggle:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.districts-dropdown-toggle.active {
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
  background: #ffffff;
}

.districts-selected-text {
  flex: 1;
  text-align: left;
  color: var(--color-gray-900);
}

.districts-arrow {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  transition: transform 0.3s ease;
  margin-left: 8px;
}

.districts-dropdown-toggle.active .districts-arrow {
  transform: rotate(180deg);
}

.districts-dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 10006;
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-10px);
  visibility: hidden;
}

.districts-dropdown-content.active {
  max-height: 500px;
  min-height: 200px;
  opacity: 1;
  transform: translateY(0);
  overflow-y: auto;
  overflow-x: hidden;
  visibility: visible;
}

/* Custom scrollbar for districts dropdown */
.districts-dropdown-content.active::-webkit-scrollbar {
  width: 8px;
}

.districts-dropdown-content.active::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 4px;
}

.districts-dropdown-content.active::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 4px;
}

.districts-dropdown-content.active::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

.districts-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  min-height: fit-content;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  user-select: none;
  width: 100%;
  flex-shrink: 0;
}

.checkbox-label:hover {
  background: var(--color-gray-50);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}

.checkbox-label span {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-gray-700);
}

.checkbox-label input[type="checkbox"]:checked + span {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-group-districts {
  flex: 1;
  min-width: 180px;
  max-width: 250px;
  overflow: visible;
  position: relative;
  /* Doit passer au-dessus des autres filtres quand ouvert */
  z-index: 10020;
}

@media (max-width: 767px) {
  .filter-group-districts {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }
}

/* Nationality Dropdown */
.nationality-dropdown {
  position: relative;
  width: 100%;
  overflow: visible;
  z-index: 10001;
}

.nationality-dropdown-toggle {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  background: var(--color-white);
  color: var(--color-gray-900);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-family: inherit;
}

.nationality-dropdown-toggle:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.nationality-dropdown-toggle.active {
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 4px rgba(37, 99, 235, 0.12),
    0 4px 12px rgba(37, 99, 235, 0.15);
}

.nationality-selected-text {
  flex: 1;
  text-align: left;
  color: var(--color-gray-900);
}

.nationality-arrow {
  font-size: 0.75rem;
  color: var(--color-gray-500);
  transition: transform 0.3s ease;
  margin-left: 8px;
}

.nationality-dropdown-toggle.active .nationality-arrow {
  transform: rotate(180deg);
}

.nationality-dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: 14px;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.08);
  z-index: 10002;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(-10px);
  visibility: hidden;
  margin-top: 4px;
}

.nationality-dropdown-content.active {
  max-height: 400px;
  min-height: 200px;
  opacity: 1;
  transform: translateY(0);
  overflow-y: auto;
  overflow-x: hidden;
  visibility: visible;
}

.nationality-search-container {
  padding: 12px;
  border-bottom: 1px solid var(--color-gray-200);
  position: sticky;
  top: 0;
  background: var(--color-white);
  z-index: 1;
}

.nationality-search {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  border: 2px solid var(--color-gray-200);
  border-radius: 10px;
  background: var(--color-gray-50);
  color: var(--color-gray-900);
  transition: all 0.2s ease;
  font-family: inherit;
}

.nationality-search:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nationality-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nationality-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.nationality-item:hover {
  background: var(--color-gray-50);
  transform: translateX(4px);
}

.nationality-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  color: var(--color-primary);
  font-weight: 600;
  border-left: 3px solid var(--color-primary);
}

.nationality-item.active .nationality-item-text {
  color: var(--color-primary);
  font-weight: 600;
}

.nationality-item-text {
  font-size: 0.9375rem;
  color: var(--color-gray-700);
  transition: all 0.2s ease;
}

.filter-group-nationality {
  flex: 1;
  min-width: 180px;
  max-width: 250px;
  overflow: visible;
  position: relative;
  /* Laisse la priorité au dropdown des quartiers */
  z-index: 10010;
}

@media (max-width: 767px) {
  .filter-group-nationality {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }
}

/* Custom scrollbar for nationality dropdown */
.nationality-dropdown-content.active::-webkit-scrollbar {
  width: 8px;
}

.nationality-dropdown-content.active::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 4px;
}

.nationality-dropdown-content.active::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 4px;
}

.nationality-dropdown-content.active::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-400);
}

/* Character Counter */
.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--color-gray-500);
  margin-top: 4px;
  transition: color 0.2s ease;
}

.char-counter-error {
  color: #ef4444;
}

.char-counter-error span {
  color: #ef4444;
  font-weight: 600;
}

/* Form Error Message */
.form-error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}

.form-input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Disabled Button */
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Form Success Message */
.form-success-message {
  padding: var(--spacing-xl);
  text-align: center;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 16px;
  border: 2px solid #10b981;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.success-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #065f46;
  margin-bottom: var(--spacing-sm);
}

.success-content p {
  font-size: 1rem;
  color: #047857;
  line-height: 1.6;
}

/* Profile Details Modal */
.profile-details-content {
  padding: 28px;
}

.profile-details-header {
  display: flex;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--color-gray-200);
}

.profile-details-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.profile-details-header-info h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 var(--spacing-xs) 0;
}

.profile-details-nationality {
  font-size: 1rem;
  color: var(--color-gray-600);
  margin: 0;
}

.profile-details-section {
  margin-bottom: var(--spacing-xl);
}

.profile-details-section h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin-bottom: var(--spacing-md);
}

.profile-details-description {
  font-size: 1rem;
  color: var(--color-gray-700);
  line-height: 1.7;
  margin: 0;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.profile-details-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--spacing-md);
  background: var(--color-gray-50);
  border-radius: 12px;
}

.profile-details-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-details-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-gray-900);
}

.profile-details-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-gray-200);
  margin-bottom: var(--spacing-lg);
}

.profile-details-meta small {
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

.profile-details-actions {
  margin-top: var(--spacing-xl);
}

.btn-whatsapp-full {
  width: 100%;
}

/* Card Improvements */
.colocation-card-meta {
  font-size: 0.8125rem;
  color: var(--color-gray-600);
  margin: 0;
  line-height: 1.4;
}

.colocation-card-footer-info {
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-gray-100);
  margin-top: var(--spacing-sm);
}

.colocation-card-availability {
  font-size: 0.875rem;
  color: var(--color-gray-600);
}

.btn-read-more {
  display: none; /* Hidden in card, visible in modal */
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  text-align: left;
  transition: color 0.2s ease;
}

.btn-read-more:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.badge-search-type {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
}

/* Submit Button Loading State */
.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .modal-content-large {
    max-width: 100%;
    max-height: 95vh;
  }
  
  .profile-details-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .profile-details-grid {
    grid-template-columns: 1fr;
  }
}

/* Photo Crop Modal - Simplified Interface */
.modal-content-crop {
  max-width: 500px;
  width: 90%;
}

/* Preview Mode (Default) */
.crop-preview-mode {
  padding: 24px;
  text-align: center;
}

.crop-preview-container {
  width: 300px;
  height: 300px;
  margin: 0 auto 24px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #f8fafc;
}

.crop-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  image-rendering: -webkit-optimize-contrast; /* Better quality on WebKit */
  image-rendering: crisp-edges; /* Better quality on Firefox */
}

.crop-preview-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.crop-preview-actions .btn {
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 140px;
}

.btn-adjust {
  background: #f1f5f9;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.btn-adjust:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.crop-preview-actions .btn-submit {
  background: #2563eb;
  color: white;
}

.crop-preview-actions .btn-submit:hover {
  background: #1d4ed8;
}

/* Adjust Mode (Optional) */
.crop-adjust-mode {
  padding: 24px;
}

.crop-adjust-hint {
  text-align: center;
  margin-bottom: 16px;
  padding: 12px;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #bae6fd;
}

.crop-adjust-hint p {
  margin: 0;
  font-size: 0.875rem;
  color: #0369a1;
  font-weight: 500;
}

.crop-area {
  position: relative;
  width: 100%;
  height: 400px;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e2e8f0;
}

#cropImage {
  user-select: none;
  cursor: grab;
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  touch-action: none; /* Prevent scroll/zoom during drag */
  will-change: transform; /* Optimize for smooth animations */
}

#cropImage:active {
  cursor: grabbing;
}

#cropImage:focus {
  outline: none;
}

.crop-center-guide {
  position: absolute;
  width: 300px;
  height: 300px;
  border: 2px dashed rgba(37, 99, 235, 0.3);
  border-radius: 8px;
  pointer-events: none;
  z-index: 10;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.crop-center-guide::before,
.crop-center-guide::after {
  content: '';
  position: absolute;
  background: rgba(37, 99, 235, 0.2);
}

.crop-center-guide::before {
  width: 2px;
  height: 30px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.crop-center-guide::after {
  width: 30px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.crop-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crop-zoom-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.crop-zoom-control label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray-700);
  min-width: 60px;
}

.crop-zoom-control input[type="range"] {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  touch-action: none; /* Prevent scroll during slider drag */
}

.crop-zoom-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

.crop-zoom-control input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.crop-zoom-control input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease;
}

.crop-zoom-control input[type="range"]::-moz-range-thumb:active {
  transform: scale(1.2);
}

.crop-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.crop-actions .btn {
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.crop-actions .btn-cancel {
  background: #f1f5f9;
  color: #475569;
}

.crop-actions .btn-cancel:hover {
  background: #e2e8f0;
}

.crop-actions .btn-submit {
  background: #2563eb;
  color: white;
}

.crop-actions .btn-submit:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .crop-preview-container {
    width: 250px;
    height: 250px;
  }
  
  .crop-area {
    height: 300px;
  }
  
  .crop-center-guide {
    width: 250px;
    height: 250px;
  }
  
  .crop-preview-actions {
    flex-direction: column;
  }
  
  .crop-preview-actions .btn {
    width: 100%;
  }
  
  .crop-actions {
    flex-direction: column;
  }
  
  .crop-actions .btn {
    width: 100%;
  }
  
  /* Larger slider thumb for mobile */
  .crop-zoom-control input[type="range"]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  
  .crop-zoom-control input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }
  
  .crop-zoom-control input[type="range"] {
    height: 10px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


