/* ============================================
   Real Estate Prompts Blog - Main Stylesheet
   Clean, professional, user-first design
   ============================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #8b5cf6;
  --accent: #f59e0b;
  --success: #10b981;
  --dark: #0f172a;
  --gray-800: #1e293b;
  --gray-600: #475569;
  --gray-400: #94a3b8;
  --gray-100: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --radius-lg: 1rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--gray-800);
  background: var(--gray-100);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--dark);
}

h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.75rem;
}

.logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--dark);
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--gray-600);
}

.main-nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  transition: 0.3s;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .main-nav.active {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .main-nav.active ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
}

/* Trust Bar */
.trust-bar {
  background: linear-gradient(135deg, var(--dark), #1e293b);
  color: var(--white);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Blog Header */
.blog-header {
  text-align: center;
  padding: 4rem 0 2rem;
  background: linear-gradient(135deg, var(--white), var(--gray-100));
}

.blog-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.blog-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 700px;
  margin: 1rem auto 0;
}

/* Stats Bar */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Featured Post */
.featured-post {
  background: linear-gradient(135deg, var(--white), var(--gray-100));
  border-radius: var(--radius-lg);
  margin: 2rem 0 3rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

.featured-image {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 5rem;
}

.featured-content {
  padding: 2rem 2rem 2rem 0;
}

@media (max-width: 768px) {
  .featured-content {
    padding: 2rem;
  }
}

.featured-tag {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.featured-content h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.featured-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--gray-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.featured-excerpt {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Filter Section */
.filter-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-tab {
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border: none;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab.active {
  background: var(--primary);
  color: var(--white);
}

.results-info {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 2rem;
  text-align: center;
  color: var(--white);
  font-size: 2rem;
}

.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  align-self: flex-start;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  color: var(--dark);
  text-decoration: none;
}

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

.card-meta {
  display: flex;
  gap: 1rem;
  color: var(--gray-400);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-excerpt {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.card-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.card-link:hover {
  gap: 0.75rem;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, var(--dark), #1e293b);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin: 3rem 0;
  text-align: center;
  color: var(--white);
}

.newsletter h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.newsletter p {
  color: var(--gray-400);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0.5rem;
}

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

.newsletter-form input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 100px;
  font-size: 1rem;
}

.newsletter-form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: var(--primary-dark);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--white);
}

footer p {
  text-align: center;
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Utility */
.text-center {
  text-align: center;
}

.loading {
  text-align: center;
  padding: 4rem;
  color: var(--gray-600);
}

.no-results {
  text-align: center;
  padding: 4rem;
  grid-column: 1 / -1;
  color: var(--gray-600);
}

/* Blog Card Image Styles */
.blog-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card-image {
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  background: #f0f9ff;
  color: #3b82f6;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card-title a {
  color: #0f172a;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: #3b82f6;
}

.card-meta {
  display: flex;
  gap: 1rem;
  color: #94a3b8;
  font-size: 0.7rem;
  margin-bottom: 0.75rem;
}

.card-excerpt {
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  transition: gap 0.2s;
}

.card-link:hover {
  gap: 0.75rem;
}