/* ===================
   AREAS DE ATUAÇÃO - CARDS
   =================== */

.areas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

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

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

/* Card Container */
.area-card {
  perspective: 1000px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.area-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay de animação para cada card */
.area-card:nth-child(1) { transition-delay: 0.05s; }
.area-card:nth-child(2) { transition-delay: 0.1s; }
.area-card:nth-child(3) { transition-delay: 0.15s; }
.area-card:nth-child(4) { transition-delay: 0.2s; }
.area-card:nth-child(5) { transition-delay: 0.25s; }
.area-card:nth-child(6) { transition-delay: 0.3s; }

/* Card Inner (flip container) */
.area-card-inner {
  position: relative;
  width: 100%;
  height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

/* Flip por clique (classe adicionada via JS) */
.area-card.is-flipped .area-card-inner {
  transform: rotateX(180deg);
}

/* Front & Back faces */
.area-card-front,
.area-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Front Face */
.area-card-front {
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.area-card:hover .area-card-front {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(200, 162, 83, 0.25);
}

/* Back Face */
.area-card-back {
  background: linear-gradient(145deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid #333;
  transform: rotateX(180deg);
}

/* Icon */
.area-icon {
  width: 52px;
  height: 52px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: border-color 0.4s ease;
}

.area-icon i {
  font-size: 1.4rem;
  color: #C8A253;
}

.area-card:hover .area-card-front .area-icon {
  border-color: rgba(200, 162, 83, 0.35);
}

/* Back Icon */
.area-icon-back {
  background: rgba(200, 162, 83, 0.12);
  border-color: rgba(200, 162, 83, 0.25);
  width: 46px;
  height: 46px;
  margin-bottom: 0.75rem;
}

.area-icon-back i {
  color: #C8A253;
  font-size: 1.2rem;
}

/* Title */
.area-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

/* Description */
.area-description {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

/* Indicator (Ver mais) - aparece no hover */
.area-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #C8A253;
  font-weight: 500;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.area-indicator i {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.area-card:hover .area-indicator {
  opacity: 1;
  transform: translateY(0);
}

.area-card:hover .area-indicator i {
  transform: translateX(3px);
}

/* Back Text */
.area-back-text {
  font-size: 0.85rem;
  color: #a1a1a1;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Button */
.area-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: 1px solid rgba(200, 162, 83, 0.5);
  border-radius: 6px;
  color: #C8A253;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.area-btn:hover {
  background: rgba(200, 162, 83, 0.1);
  border-color: #C8A253;
}

/* ===================
   MODAL STYLES
   =================== */

dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

/* ===================
   RESPONSIVO
   =================== */

@media (max-width: 640px) {
  .area-card-inner {
    height: 200px;
  }

  .area-card-front,
  .area-card-back {
    padding: 1.5rem;
  }

  .area-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 0.75rem;
  }

  .area-icon i {
    font-size: 1.25rem;
  }

  .area-title {
    font-size: 1rem;
  }

  .area-description {
    font-size: 0.8rem;
  }

  .area-back-text {
    font-size: 0.8rem;
  }

  .area-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
  }
}
