/* ============================================
   BLOG STYLES - ROSÉ PINE THEME
   ============================================ */

:root {
  --bg-dark: #191724;
  --bg-surface: #26233a;
  --text-light: #e0def4;
  --text-gray: #908caa;
  --border-color: #403d52;
  --accent1: #eb6f92;
  --accent2: #9ccfd8;
  --accent3: #f6c177;
  --accent4: #c4a7e7;
  --accent5: #31748f;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  background: rgba(26, 23, 36, 0.95);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent1);
  text-decoration: none;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent1);
}

/* ============================================
   BLOG CONTAINER
   ============================================ */

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 30px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-section {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
}

.sidebar-section h3 {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-section h3 i {
  color: var(--accent1);
}

/* Search Box */
.search-section {
  padding: 20px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 15px;
  color: var(--text-gray);
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(235, 111, 146, 0.1);
}

.search-box input::placeholder {
  color: var(--text-gray);
}

/* Category List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: var(--bg-dark);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid transparent;
}

.category-item:hover,
.category-item.active {
  background: rgba(235, 111, 146, 0.1);
  border-color: var(--accent1);
  transform: translateX(5px);
}

.category-item i {
  color: var(--accent1);
  font-size: 1.1rem;
}

.category-item span:nth-child(2) {
  flex: 1;
  color: var(--text-light);
  font-size: 0.9rem;
}

.category-item .count {
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  color: var(--text-gray);
}

/* Recent List */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.recent-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: var(--bg-dark);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.recent-item:hover {
  background: rgba(235, 111, 146, 0.05);
  border-left-color: var(--accent1);
  transform: translateX(3px);
}

.recent-title {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
}

.recent-date {
  color: var(--text-gray);
  font-size: 0.8rem;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 12px;
  background: rgba(235, 111, 146, 0.1);
  border: 1px solid rgba(235, 111, 146, 0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent1);
  cursor: pointer;
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(235, 111, 146, 0.2);
  border-color: var(--accent1);
  transform: translateY(-2px);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  min-height: 100vh;
}

.blog-header {
  margin-bottom: 40px;
}

.blog-header h1 {
  font-size: 2.5rem;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 700;
}

.blog-header p {
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.post-card {
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.post-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent1);
  box-shadow: 0 15px 40px rgba(235, 111, 146, 0.2);
}

.post-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

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

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

.post-category {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--accent1);
  color: var(--bg-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.post-content {
  padding: 25px;
}

.post-title {
  margin-bottom: 15px;
}

.post-title a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  transition: color 0.3s;
}

.post-title a:hover {
  color: var(--accent1);
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  color: var(--text-gray);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta i {
  color: var(--accent2);
}

.post-excerpt {
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.post-tags .tag {
  padding: 5px 10px;
  font-size: 0.75rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .sidebar-section {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .blog-container {
    padding: 30px 20px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .blog-header h1 {
    font-size: 2rem;
  }

  .nav-container {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .blog-header h1 {
    font-size: 1.8rem;
  }

  .post-title a {
    font-size: 1.1rem;
  }

  .sidebar-section {
    padding: 20px;
  }

  .post-content {
    padding: 20px;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeIn 0.5s ease-out;
}

.post-card:nth-child(1) {
  animation-delay: 0.1s;
}
.post-card:nth-child(2) {
  animation-delay: 0.2s;
}
.post-card:nth-child(3) {
  animation-delay: 0.3s;
}
.post-card:nth-child(4) {
  animation-delay: 0.4s;
}
.post-card:nth-child(5) {
  animation-delay: 0.5s;
}
.post-card:nth-child(6) {
  animation-delay: 0.6s;
}
/* ============================================
   FOOTER STYLES - ROSÉ PINE THEME
   Add this to blog.css
   ============================================ */

.blog-footer {
  background: var(--bg-surface);
  border-top: 2px solid var(--border-color);
  margin-top: 80px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 30px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
}

.footer-section h4 {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-section p {
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Social Links */
.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 1.1rem;
  transition: all 0.3s;
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--accent1);
  border-color: var(--accent1);
  color: var(--bg-dark);
  transform: translateY(-3px);
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent1);
  transform: translateX(5px);
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(235, 111, 146, 0.1);
}

.newsletter-form input::placeholder {
  color: var(--text-gray);
}

.newsletter-form button {
  padding: 12px 20px;
  background: var(--accent1);
  border: none;
  border-radius: 8px;
  color: var(--bg-dark);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.newsletter-form button:hover {
  background: var(--accent2);
  transform: scale(1.05);
}

/* Footer Bottom */
.footer-bottom {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
  padding: 25px 30px;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.footer-bottom p {
  color: var(--text-gray);
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom i.fa-heart {
  color: var(--accent1);
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Responsive Footer */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    padding: 40px 20px 20px;
  }

  .footer-bottom .footer-container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form button {
    width: 100%;
  }
}

/* ============================================
   NEWSLETTER FORM VALIDATION STYLES
   ============================================ */

.newsletter-form .form-group {
  position: relative;
}

.newsletter-form input[type="email"] {
  width: 100%;
  transition: all 0.3s ease;
}

/* Valid state */
.newsletter-form input.valid {
  border-color: var(--accent2);
}

/* Invalid state */
.newsletter-form input.invalid {
  border-color: var(--accent1);
}

/* Shake animation for errors */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.newsletter-form input.shake {
  animation: shake 0.5s ease;
}

/* Email feedback */
.email-feedback {
  display: block;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 20px;
  transition: all 0.3s ease;
}

.email-feedback.error {
  color: var(--accent1);
}

.email-feedback.success {
  color: var(--accent2);
}

/* Success message */
.newsletter-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(156, 207, 216, 0.2);
  border: 1px solid var(--accent2);
  border-left: 4px solid var(--accent2);
  border-radius: 8px;
  margin-top: 15px;
  animation: slideIn 0.3s ease;
  transition: opacity 0.3s;
}

.newsletter-success i {
  color: var(--accent2);
  font-size: 1.3rem;
}

.newsletter-success span {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button loading state */
.newsletter-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
