:root {
  --primary: #225874;
  --secondary: #eb6b2a;
  --accent: #f8b45c;
  --dark: #1a252f;
  --light: #f8f9fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --text: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--light);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Modern Header */
.blog-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4560 100%);
  color: white;
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(235, 107, 42, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(235, 107, 42, 0.1) 0%,
      transparent 50%
    );
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.blog-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
}

.blog-header p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 18px 25px;
  border-radius: 50px;
  border: none;
  font-size: 1.1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-bar button {
  position: absolute;
  right: 10px;
  top: 10px;
  background: var(--secondary);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background: #e05a1a;
}

/* Main Content Layout */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: flex;
  gap: 40px;
}

/* Blog Posts Grid */
.blog-posts {
  flex: 2;
}

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

.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-image {
  height: 220px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

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

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

.card-category {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--secondary);
  color: white;
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
}

.card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--dark);
}

.card-content p {
  color: var(--gray);
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}

.author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.post-date {
  font-size: 0.85rem;
  color: var(--gray);
}

.read-time {
  font-size: 0.85rem;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 5px;
}

.read-more {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  justify-content: end;
  padding-top: 22px;
}

.read-more:hover {
  color: var(--primary);
  gap: 8px;
}

/* Featured Post */
.featured-post {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-post .card-image {
  height: 100%;
}

.featured-post .card-content {
  padding: 40px;
}

.featured-post .card-content h3 {
  font-size: 1.8rem;
}

/* Sidebar */
.blog-sidebar {
  flex: 1;
}

.sidebar-widget {
  background: white;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.widget-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--dark);
  position: relative;
  padding-bottom: 10px;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary);
}

.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--light-gray);
}

.categories-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.categories-list a {
  text-decoration: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.categories-list a:hover {
  color: var(--secondary);
}

.categories-list span {
  background: var(--light-gray);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.recent-posts {
  list-style: none;
}

.recent-post {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.recent-post:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.recent-post-img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}

.recent-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-post-content h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.recent-post-content h4 a {
  text-decoration: none;
  color: var(--dark);
  transition: all 0.3s ease;
}

.recent-post-content h4 a:hover {
  color: var(--secondary);
}

.recent-post-content .post-date {
  font-size: 0.85rem;
}

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

.tag {
  background: var(--light-gray);
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.tag:hover {
  background: var(--secondary);
  color: white;
}

/* Newsletter Widget */
.newsletter-form {
  margin-top: 20px;
}

.newsletter-form input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--light-gray);
  border-radius: 10px;
  margin-bottom: 15px;
  font-size: 1rem;
}

.newsletter-form button {
  width: 100%;
  background: var(--secondary);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  background: #e05a1a;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 60px;
  gap: 10px;
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pagination a.active,
.pagination a:hover {
  background: var(--secondary);
  color: white;
}

/* Footer */
.blog-footer {
  background: var(--dark);
  color: white;
  padding: 80px 0 40px;
  margin-top: 60px;
}

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

.footer-widget h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-widget h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary);
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 992px) {
  .blog-container {
    flex-direction: column;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post .card-image {
    height: 300px;
  }
}

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

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
