/* blog.css - Styles for the Blog page */

/* Enhanced Brand Styling */
.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: #06b6d4;
  font-weight: 600;
  margin-left: -0.5rem;
  transform: rotate(-3deg);
  opacity: 0.95;
}

.navbar-brand:hover .brand-logo {
  transform: scale(1.08) rotate(3deg);
}

/* Page Header */
.page-header {
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(0, 123, 255, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.section-tagline {
  color: var(--blue-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--secondary);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Blog Listing */
.blog-listing {
  padding: 4rem 0;
}

.blog-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 300ms ease;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.blog-card .card-image {
  height: 260px;
  width: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.blog-card:hover .card-image {
  transform: scale(1.1);
}

.blog-card .card-body {
    margin-top: 30px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--secondary);
  font-family: 'Poppins', sans-serif;
}

.blog-card .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.blog-card .excerpt {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

.blog-card .btn {
  align-self: flex-start;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Modal for Blog Post */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24, 30, 75, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  z-index: 2001;
  transition: opacity 300ms ease;
}

.modal-backdrop.visible {
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 2002;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  opacity: 0;
  transition: transform 300ms ease, opacity 300ms ease;
  margin: auto;
  overflow: hidden;
}

.modal-content.visible {
  transform: scale(1);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--blue-accent);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
  transition: all 300ms ease;
}

.modal-close:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.modal-body {
  padding: 3rem;
}

.modal-body .post {
  max-width: 700px;
  margin: 0 auto;
}

.modal-body .post h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--secondary);
  margin-bottom: 1rem;
}

.modal-body .post .meta {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.modal-body .post .post-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.modal-body .post .post-content {
  line-height: 1.8;
  color: var(--text-light);
}

.modal-body .post .post-content p {
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .brand-text {
    font-size: 1.3rem;
  }
  .brand-subtitle {
    font-size: 0.85rem;
  }
  .page-header {
    padding: 4rem 0 2rem;
  }
  
  .blog-listing {
    padding: 3rem 0;
  }
  
  .blog-card .card-body {
    padding: 1.5rem;
  }
  
  .modal-body {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .brand-text {
    font-size: 1.2rem;
  }
  .brand-subtitle {
    font-size: 0.8rem;
  }
  .page-header {
    padding: 3rem 0 1rem;
  }
  
  .section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }
  
  .modal-body .post h2 {
    font-size: 1.6rem;
  }
}