/**
 * PUBLIC PAGES STYLES
 * Estilos para páginas públicas (Serviços, Recrutamento, etc)
 */

/* ========================================
   PUBLIC SERVICES PAGE
   ======================================== */

.service-card-public {
  background: var(--color-surface);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card-public:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.service-icon-public {
  font-size: 64px;
  margin-bottom: 16px;
}

.service-card-public h3 {
  margin: 16px 0 12px 0;
  font-size: 24px;
  color: var(--color-text);
}

.service-card-public p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ========================================
   PUBLIC JOB OPENINGS
   ======================================== */

.job-opening-card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.job-opening-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.job-opening-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.job-opening-header h4 {
  margin: 0;
  font-size: 24px;
  color: var(--color-text);
  flex: 1;
}

.job-type-badge {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.job-opening-meta {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.job-opening-meta span {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.job-opening-description {
  color: var(--color-text);
  line-height: 1.6;
  margin: 16px 0;
}

.job-requirements,
.job-benefits {
  margin: 16px 0;
  padding: 16px;
  background: var(--color-background);
  border-radius: 8px;
}

.job-requirements strong,
.job-benefits strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 8px;
}

.job-requirements p,
.job-benefits p {
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
  white-space: pre-line;
}

/* ========================================
   ACTIVITY LIST (Dashboard)
   ======================================== */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--color-surface);
  border-radius: 8px;
  transition: background 0.2s;
}

.activity-item:hover {
  background: var(--color-background);
}

.activity-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: 8px;
}

.activity-content {
  flex: 1;
}

.activity-title {
  margin: 0 0 4px 0;
  font-weight: 600;
  color: var(--color-text);
}

.activity-meta {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.activity-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.loading-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--color-text-secondary);
  font-size: 16px;
}

/* ========================================
   MODAL CONTENT SMALL
   ======================================== */

.modal-content--small {
  max-width: 500px;
}

/* ========================================
   RESPONSIVE - PUBLIC PAGES
   ======================================== */

@media (max-width: 768px) {
  .job-opening-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-opening-meta {
    flex-direction: column;
    gap: 8px;
  }

  .job-list,
  .services-grid {
    padding: 16px 0;
  }
}

/* ========================================
   DARK MODE - PUBLIC PAGES
   ======================================== */

body.dark-theme .service-card-public,
body.dark-theme .job-opening-card,
body.dark-theme .activity-item {
  background: var(--color-surface-dark);
}

body.dark-theme .job-requirements,
body.dark-theme .job-benefits,
body.dark-theme .activity-item:hover {
  background: var(--color-background-dark);
}

/* ========================================
   MOBILE PROPERTY DETAILS REORDERING
   ======================================== */

@media (max-width: 768px) {

  /* Make the main container a flex column to allow reordering of all children */
  .property-details-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Add gap to container for consistent spacing */
  }

  /* Keep header at the very top */
  .property-details-header {
    order: -1;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* Unwrap the layout wrapper */
  .property-details-layout {
    display: contents;
  }

  /* Unwrap the column wrappers */
  .property-images-section,
  .property-info-section {
    display: contents;
  }

  /* 1. Fotografias */
  .image-carousel {
    order: 1;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* Video button should stay with images */
  .property-video-button {
    order: 1;
    margin-top: 0;
    /* Let gap handle spacing */
  }

  /* 2. Titulo e preço */
  .property-main-info {
    order: 2;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* 3. Caracteristicas principais */
  .property-characteristics {
    order: 3;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* 4. Especificações */
  .property-specs-detailed {
    order: 4;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* 5. Descrição */
  .property-description {
    order: 5;
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* 6. Localização */
  .property-location-card {
    order: 6;
    display: block;
    width: 100%;
    margin-top: 0;
    /* Let gap handle spacing */
    margin-bottom: 0;
    /* Let gap handle spacing */
  }

  /* Simulator - follows content */
  .loan-simulator-section {
    order: 7;
    margin-top: 0;
    /* Let gap handle spacing */
  }

  /* 7. Consultor */
  .agent-info-section {
    order: 8;
    margin-top: 0;
    /* Let gap handle spacing */
  }

  /* Reference below price */
  .property-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .property-reference-badge {
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ========================================
   DESKTOP PROPERTY CONSULTANT IN LEFT COLUMN
   ======================================== */

@media (min-width: 769px) {

  /* Consultant section in left column on desktop */
  .property-images-section .agent-info-section {
    margin-top: 2rem;
    margin-bottom: 0;
  }

  /* Reduce header size for narrower column */
  .property-images-section .agent-section-header {
    margin-bottom: 1.5rem;
  }

  .property-images-section .agent-header-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .property-images-section .agent-header-content h2 {
    font-size: 1.25rem;
  }

  .property-images-section .agent-header-content p {
    font-size: 0.875rem;
  }

  /* Adapt agent card for narrower column */
  .property-images-section .agent-card {
    padding: 1.5rem;
  }

  .property-images-section .agent-card-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .property-images-section .agent-main-info {
    flex-direction: column;
    text-align: center;
  }

  /* Stack contact cards vertically */
  .property-images-section .agent-contact-section {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .property-images-section .contact-card {
    width: 100%;
    min-width: auto;
  }
}