/* =========================================================
   HEADER
   ========================================================= */

.states-header {
  text-align: center;
  margin-bottom: 14px;
}

.states-header h1 {
  margin: 0;
  font-size: 46px;
}

.states-header p {
  margin-top: 12px;
  font-size: 14px;
}


/* =========================================================
   SEARCH + FILTER AREA
   ========================================================= */

.place-controls {
  margin-bottom: 35px;
}


/* SEARCH */

.place-search {
  margin-bottom: 20px;
}

.place-search input {
  width: 100%;
  box-sizing: border-box;

  padding: 15px 18px;

  border: 1px solid #ccc;
  border-radius: 12px;

  font-size: 16px;

  outline: none;
}

.place-search input:focus {
  border-color: var(--accent);
}


/* FILTER BUTTONS */

.place-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.place-filter {
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.place-filter:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.place-filter.active {
    background: #000;
    border-color: #b0bcf8;
    color: #ceebcc;
    box-shadow: 0 2px 4px rgba(254, 254, 254, 0.5);
}


/* ==========================================================================
   Place Grid
   ========================================================================== */
.place-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ==========================================================================
   Flip Card Container & 3D Setup
   ========================================================================== */
.place-card {
  height: 360px;
  perspective: 1000px;
}

.place-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.place-card:hover .place-card-inner {
  transform: rotateY(180deg);
}

/* Shared Face Styles */
.place-card-front,
.place-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 20px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: border-color 0.3s ease;
}

/* ==========================================================================
   Place Card - Front (Dark / --card-bg Theme)
   ========================================================================== */
.place-card-front {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--card-bg, #1a1d24);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-color, #27272a);
  color: var(--text-main, #ffffff);
}

.place-card-front-content {
  padding: 24px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.85));
}

.place-card-front-content h1,
.place-card-front-content h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.place-card-front-content p {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* ==========================================================================
   Place Card - Back (Light / White Theme)
   ========================================================================== */
.place-card-back {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #111827;
  transform: rotateY(180deg);
}

.place-card-back h1,
.place-card-back h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 600;
  color: #111827;
}

.place-card-back p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4b5563;
}


/* =========================================================
   STATUS
   ========================================================= */

.place-status {

  display: inline-block;

  padding: 7px 13px;

  border-radius: 20px;

  font-size: 13px;

  margin-bottom: 10px;

  background: #000;

  color: var(--text-main);
}


/* =========================================================
   BUDGET
   ========================================================= */

.place-budget {

  margin-bottom: 22px;

  color: #000;

  font-size: 14px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.place-actions {

  display: flex;

  gap: 10px;

  justify-content: center;
}

.place-action {

  display: inline-block;

  padding: 10px 16px;

  border-radius: 10px;

  border: 1px solid #ccc;

  text-decoration: none;

  color: #222;

  font-size: 13px;

  transition: all 0.2s ease;
}

.place-action:hover {

  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(254, 254, 254, 0.5);
  
}


/* =========================================================
   NO RESULTS
   ========================================================= */

.place-no-results {

  display: none;

  margin-top: 25px;

  padding: 30px;

  text-align: center;

  border: 1px dashed #ccc;

  border-radius: 14px;

  color: #777;
}



/* =========================================
   RESPONSIVE ARRANGEMENTS (TABLET & MOBILE)
   ========================================= */

/* Tablet Viewport Adjustments (Width 900px and down) */
@media (max-width: 900px) {
  .place-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Mobile Viewport Adjustments (Width 600px and down) */
@media (max-width: 600px) {
  header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .place-filters {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .place-filter {
    flex-shrink: 0;
  }

  .place-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .place-card {
    width: 100%;
  }
}