/* ========================================
   PATRIMONIO FICHAS - HERITAGE DESIGN SYSTEM
   ======================================== */

/* ========================================
   1. DESIGN SYSTEM VARIABLES
   ======================================== */
:root {
  /* Brand Colors */
  --pf-primary: #C65D33;
  --pf-secondary: #D4AF37;
  --pf-accent: #2D5F3F;
  
  /* Base Colors */
  --pf-background: #FDFCF9;
  --pf-foreground: #2C1810;
  --pf-muted: #F5F3F0;
  --pf-border: #E8E3DB;
  
  /* Status Colors */
  --pf-excellent: #D4AF37;
  --pf-good: #4A7C59;
  --pf-caution: #E07A39;
  --pf-danger: #dc3545;
  
  /* Gradients */
  --pf-gradient-heritage: linear-gradient(135deg, #C65D33, #D4AF37);
  --pf-gradient-card: linear-gradient(145deg, #FFFFFF, #F5F3F0);
  
  /* Shadows */
  --pf-shadow-card: 0 2px 10px rgba(44, 24, 16, 0.08);
  --pf-shadow-elevated: 0 8px 30px rgba(198, 93, 51, 0.2);
  
  /* Transitions */
  --pf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   2. BASE STYLES & RESET
   ======================================== */
.pf-dashboard,
.pf-dashboard * {
  box-sizing: border-box;
}

.pf-dashboard {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--pf-foreground);
  background-color: var(--pf-background);
}

/* ========================================
   3. HERO SECTION
   ======================================== */
.pf-hero {
  background: var(--pf-gradient-heritage);
  color: white !important;
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pf-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.pf-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.pf-hero-title {
  font-size: 2.5rem;
  color: white !important;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.pf-hero-title i {
  font-size: 2rem;
}

.pf-hero-description {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ========================================
   4. STATISTICS SECTION
   ======================================== */
.pf-stats {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.pf-stat-card {
  background: var(--pf-gradient-card);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--pf-shadow-card);
  transition: var(--pf-transition);
}

.pf-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pf-shadow-elevated);
}

.pf-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pf-primary);
  margin-bottom: 0.5rem;
}

.pf-stat-excellent .pf-stat-number {
  color: var(--pf-excellent);
}

.pf-stat-good .pf-stat-number {
  color: var(--pf-good);
}

.pf-stat-caution .pf-stat-number {
  color: var(--pf-caution);
}

.pf-stat-label {
  font-size: 0.875rem;
  color: var(--pf-foreground);
  opacity: 0.8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   5. FILTERS SECTION
   ======================================== */
.pf-filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pf-filters-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Search Input */
.pf-search-container {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.pf-search-container input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 2px solid var(--pf-border);
  border-radius: 24px;
  font-size: 16px;
  background: white;
  transition: var(--pf-transition);
}

.pf-search-container input:focus {
  outline: none;
  border-color: var(--pf-primary);
  box-shadow: 0 0 0 3px rgba(198, 93, 51, 0.1);
}

.pf-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pf-primary);
  opacity: 0.6;
}

/* Category Selector */
.pf-category-selector {
  position: relative;
  min-width: 160px;
}

.pf-category-selector select {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 2px solid var(--pf-border);
  border-radius: 24px;
  font-size: 16px;
  background: white;
  transition: var(--pf-transition);
  appearance: none;
  cursor: pointer;
}

.pf-category-selector select:focus {
  outline: none;
  border-color: var(--pf-primary);
  box-shadow: 0 0 0 3px rgba(198, 93, 51, 0.1);
}

.pf-category-icon,
.pf-category-arrow {
  position: absolute;
  color: var(--pf-primary);
  opacity: 0.6;
  pointer-events: none;
}

.pf-category-icon { left: 16px; top: 50%; transform: translateY(-50%); }
.pf-category-arrow { right: 16px; top: 50%; transform: translateY(-50%); }

/* Filter Badges */
.pf-filter-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.pf-filter-label {
  color: var(--pf-foreground);
  opacity: 0.7;
  font-weight: 500;
  margin-right: 0.5rem;
}

.pf-filter-badge {
  padding: 12px 20px;
  border-radius: 30px;
  border: 2px solid var(--pf-border);
  background: white;
  color: var(--pf-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--pf-transition);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pf-filter-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.pf-filter-badge.active,
.pf-filter-badge.pf-badge-excellent {
  background: var(--pf-excellent);
  border-color: var(--pf-excellent);
  color: white;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.pf-filter-badge.pf-badge-good {
  background: var(--pf-good);
  border-color: var(--pf-good);
  color: white;
  box-shadow: 0 4px 15px rgba(74, 124, 89, 0.3);
}

.pf-filter-badge.pf-badge-caution {
  background: var(--pf-caution);
  border-color: var(--pf-caution);
  color: white;
  box-shadow: 0 4px 15px rgba(224, 122, 57, 0.3);
}

/* ========================================
   6. CARDS GRID
   ======================================== */
.pf-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.pf-grid-simple {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Card Styles */
.pf-card, .pf-card-simple {
  background: var(--pf-gradient-card);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--pf-shadow-card);
  transition: var(--pf-transition);
  display: flex;
  flex-direction: column;
}

.pf-card:hover, .pf-card-simple:hover {
  transform: translateY(-3px);
  box-shadow: var(--pf-shadow-elevated);
}

/* Card Titles */
.pf-card-title, .pf-card-simple .pf-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.pf-card-title a, .pf-card-simple .pf-card-title a {
  text-decoration: none;
  color: var(--pf-foreground);
  transition: var(--pf-transition);
}

.pf-card-title a:hover, .pf-card-simple .pf-card-title a:hover {
  color: var(--pf-primary);
}

/* Compact Text in Grid */
.pf-grid .pf-card-title {
  font-size: clamp(1.1rem, 1vw, 1.1rem);
  margin-bottom: 5px;
  line-height: 1.2;
  max-height: calc(1.2em * 2);
  overflow: hidden;
  white-space: normal;
}

.pf-grid .pf-characteristic,
.pf-grid .pf-characteristic i,
.pf-grid .pf-characteristic-name,
.pf-grid .pf-status {
  font-size: 0.75rem;
  line-height: 1.2;
}

/* Cards Content */
.pf-card-content {
  padding: 1.5rem;
  flex: 1;
}

.pf-card-description {
  padding: 0 1.5rem 1rem;
  background: rgba(198, 93, 51, 0.05);
  margin: 0 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--pf-primary);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--pf-foreground);
}

/* Characteristics */
.pf-characteristics-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pf-foreground);
  opacity: 0.7;
  margin: 0 0 1rem;
}

.pf-characteristic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--pf-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  transition: var(--pf-transition);
}

.pf-characteristic:hover {
  box-shadow: var(--pf-shadow-card);
}

.pf-characteristic-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.pf-characteristic-info i {
  color: var(--pf-primary);
  width: 16px;
}

.pf-characteristic-info span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Card Actions */
.pf-card-actions {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.75rem;
  border-top: 1px solid var(--pf-border);
  background: white;
}

/* Progress Bars */
.pf-progress {
  height: 8px;
  background: var(--pf-muted);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.pf-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pf-good), var(--pf-excellent));
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Badges */
.pf-badge, .pf-status {
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pf-badge-excellent { background: var(--pf-excellent); }
.pf-badge-good { background: var(--pf-good); }
.pf-badge-caution { background: var(--pf-caution); }

/* Buttons */
.pf-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--pf-transition);
  flex: 1;
  justify-content: center;
}

.pf-button-outline {
  background: transparent;
  border: 2px solid var(--pf-border);
  color: var(--pf-foreground);
}

.pf-button-outline:hover {
  border-color: var(--pf-primary);
  color: var(--pf-primary);
  transform: translateY(-1px);
}

.pf-button-secondary {
  background: var(--pf-secondary);
  color: white;
}

.pf-button-secondary:hover {
  background: var(--pf-primary);
  transform: translateY(-1px);
}

/* ========================================
   7. SINGLE FICHA / POST STYLES
   ======================================== */
.pf-single-container {
  max-width: 950px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.pf-single-header {
  margin-bottom: 2rem;
}

.pf-single-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--pf-foreground);
  margin-bottom: 1rem;
}

.pf-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pf-single-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--pf-shadow-card);
  margin-bottom: 2rem;
}

.pf-single-content p {
  text-align: justify;
}

.pf-single-characteristics {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--pf-muted);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
  box-shadow: var(--pf-shadow-card);
}

.pf-single-characteristics h2 {
  font-size: 1.3em;
  margin-bottom: 15px;
  color: #333;
}

.pf-single-characteristics ul {
  list-style: none;
  padding: 0;
}

.pf-single-characteristics li.pf-char {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.95em;
}

.pf-single-characteristics li .pf-char-icon {
  margin-right: 10px;
  font-size: 1.2em;
  color: #0073aa;
}

.pf-single-characteristics li .pf-char-text {
  line-height: 1.3em;
}

/* Categorías */
.pf-single-categories {
  margin-top: 30px;
  padding: 1.5rem;
  background: var(--pf-background);
  border: 1px solid var(--pf-border);
  border-radius: 12px;
}

.pf-single-categories h2 {
  margin-bottom: 10px;
  font-size: 1.2em;
  color: #333;
}

.pf-categories-list .pf-category {
  display: inline-block;
  margin-right: 8px;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--pf-secondary);
  color: white;
  font-size: 0.8em;
  text-decoration: none;
  transition: var(--pf-transition);
}

.pf-categories-list .pf-category:hover {
  background: var(--pf-primary);
}

/* ========================================
   8. MAPS
   ======================================== */
.pf-map-container {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--pf-border);
}

/* ========================================
   SINGLE POST - RECOMENDACIÓN Y UBICACIÓN
   ======================================== */
.pf-post-header-above-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pf-post-header-above-title .pf-badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--pf-muted);
    color: var(--pf-foreground);
    transition: var(--pf-transition);
}

.pf-post-header-above-title .pf-badge-excellent { background: var(--pf-excellent); color: white; }
.pf-post-header-above-title .pf-badge-very_good { background: var(--pf-good); color: white; }
.pf-post-header-above-title .pf-badge-good { background: var(--pf-primary); color: white; }
.pf-post-header-above-title .pf-badge-average { background: #cccccc; color: #333; }
.pf-post-header-above-title .pf-badge-specific { background: #ffb74d; color: #333; }
.pf-post-header-above-title .pf-badge-poor { background: var(--pf-caution); color: white; }

.pf-post-header-above-title .pf-location {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--pf-foreground);
    opacity: 0.8;
}

.pf-post-header-above-title .pf-location i {
    color: var(--pf-primary);
}

/* =========================================
   ESTILOS PARA RECOMENDACIÓN Y UBICACIÓN
   Rincones con Encanto - Single Post
   ========================================= */

.pf-post-header-above-title {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 1.2em;
}

/* ====== Recomendaciones (Badges) ====== */

.pf-badge {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 30px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    letter-spacing: 0.3px;
}

/* Variantes de color según recomendación */

.pf-badge-excellent {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #111;
    text-shadow: none;
}

.pf-badge-very_good {
    background: linear-gradient(135deg, #28a745, #218838);
}

.pf-badge-good {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.pf-badge-average {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.pf-badge-specific {
    background: linear-gradient(135deg, #6610f2, #520dc2);
}

.pf-badge-poor {
    background: linear-gradient(135deg, #dc3545, #b02a37);
}

/* ====== Ubicación ====== */

.pf-location {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    background: #f2f2f2;
    padding: 6px 12px;
    border-radius: 20px;
}

.pf-location i {
    color: #e63946;
    margin-right: 6px;
    font-size: 1rem;
}

/* ====== Adaptabilidad ====== */

@media (max-width: 768px) {
    .pf-post-header-above-title {
        flex-direction: column;
        align-items: flex-start;
    }
    .pf-badge,
    .pf-location {
        font-size: 0.9rem;
    }
}


/* ========================================
   9. RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .pf-hero-title { font-size: 2rem; }
  .pf-hero-description { font-size: 1.1rem; }
}

@media (max-width: 768px) {
  .pf-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .pf-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .pf-hero { padding: 3rem 1rem; }
  .pf-search-container input, .pf-category-selector select { padding: 10px 14px 10px 40px; }
}

@media (max-width: 480px) {
  .pf-hero-title { font-size: 1.5rem; }
  .pf-hero-description { font-size: 1rem; }
  .pf-filters-row { flex-direction: column; gap: 1rem; }
}