* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8f9ff;
  color: #111827;
  overflow-x: hidden;
}

/* ========== SKIP LINK ========== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #4f46ff;
  color: white;
  padding: 8px 16px;
  z-index: 1001;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 500;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* ========== NAVBAR STYLES ========== */
.navbar {
  height: 90px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 50px;
  border-bottom: 1px solid #ececf8;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 1002;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6b5cff, #4338ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.logo h2 {
  font-size: 24px;
  background: linear-gradient(135deg, #6b5cff, #4338ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-menu li a {
  text-decoration: none;
  color: #333;
  padding: 10px 18px;
  display: block;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
}

.nav-menu li a:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.nav-menu li.active a {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.nav-toggle {
  display: none;
}

.hamburger {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid #ececf8;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1002;
  box-shadow: 0 8px 20px rgba(79, 70, 255, 0.08);
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #4f46ff;
  border-radius: 20px;
  transition: all 0.3s ease;
}

/* ========== HERO SECTION ========== */
.blog-hero {
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, #f5f6ff 0%, #fafbff 100%);
}

.badge {
  display: inline-block;
  background: #ede9ff;
  color: #4f46ff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 25px;
}

.blog-hero h1 {
  font-size: 64px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #081028;
}

.blog-hero h1 span {
  color: #4f46ff;
}

.blog-hero p {
  max-width: 700px;
  margin: auto;
  color: #667085;
  line-height: 1.8;
  font-size: 20px;
}

/* ========== FILTERS SECTION ========== */
.filters {
  width: 90%;
  max-width: 1400px;
  margin: -20px auto 0;
  background: #fff;
  border-radius: 20px;
  padding: 18px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  gap: 15px;
  position: relative;
  z-index: 10;
}

.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab {
  border: none;
  background: none;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: #475569;
}

.tab:hover {
  background: #ede9ff;
  color: #4f46ff;
}

.tab.active {
  background: linear-gradient(135deg, #6b5cff, #4338ff);
  color: white;
}

.tab:focus-visible,
.page-btn:focus-visible,
.search-box input:focus-visible,
.newsletter-right button:focus-visible,
.card-footer a:focus-visible,
.blog-title-link:focus-visible,
.blog-image-link:focus-visible,
.small-title-link:focus-visible,
.small-image-link:focus-visible {
  outline: 2px solid #4f46ff;
  outline-offset: 2px;
  border-radius: 4px;
}

.search-box {
  position: relative;
}

.search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.search-box input {
  width: 260px;
  padding: 12px 15px 12px 42px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
  background: #fafbff;
}

.search-box input:focus {
  border-color: #4f46ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 255, 0.1);
}

/* ========== BLOG GRID ========== */
.blog-grid {
  width: 90%;
  max-width: 1400px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.blog-card:nth-child(1) { transition-delay: 0.05s; }
.blog-card:nth-child(2) { transition-delay: 0.1s; }
.blog-card:nth-child(3) { transition-delay: 0.15s; }
.blog-card:nth-child(4) { transition-delay: 0.2s; }
.blog-card:nth-child(5) { transition-delay: 0.25s; }
.blog-card:nth-child(6) { transition-delay: 0.3s; }

.blog-image {
  position: relative;
  height: 230px;
  overflow: hidden;
}

.blog-image-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

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

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

.blog-title-link {
  color: #081028;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-title-link:hover {
  color: #4f46ff;
}

.tag {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  z-index: 5;
}

.tag.tutorial {
  background: #ecebff;
  color: #4338ff;
}

.tag.tips {
  background: #dcfce7;
  color: #15803d;
}

.tag.design {
  background: #ffedd5;
  color: #ea580c;
}

.tag.update {
  background: #dbeafe;
  color: #2563eb;
}

.tag.news {
  background: #fee2e2;
  color: #dc2626;
}

.tag.ecommerce {
  background: #e0f2fe;
  color: #0369a1;
}

.tag.marketing {
  background: #fce7f3;
  color: #be185d;
}

.tag.branding {
  background: #fef08a;
  color: #854d0e;
}

.blog-body {
  padding: 22px;
}

.date {
  color: #64748b;
  font-size: 13px;
  margin-bottom: 12px;
  display: block;
}

.blog-body h2,
.blog-body h3 {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #081028;
}

.blog-body p {
  color: #667085;
  line-height: 1.6;
  font-size: 14px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.card-footer span {
  color: #64748b;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-footer a {
  text-decoration: none;
  color: #4f46ff;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.card-footer a:hover {
  transform: translateX(5px);
  display: inline-block;
}

/* ========== SMALL POSTS ========== */
.small-posts {
  width: 90%;
  max-width: 1400px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.small-card {
  background: white;
  border-radius: 16px;
  padding: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.small-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.small-image-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

.small-card img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.small-title-link {
  color: #081028;
  text-decoration: none;
  transition: color 0.3s ease;
}

.small-title-link:hover {
  color: #4f46ff;
}

.small-card h4 {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 8px;
  color: #081028;
}

.small-card span {
  color: #64748b;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 50px 0;
}

.pagination button {
  width: 42px;
  height: 42px;
  border: none;
  background: white;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #475569;
}

.pagination button:hover {
  background: #ede9ff;
  color: #4f46ff;
  transform: translateY(-2px);
}

.pagination .active-page {
  background: linear-gradient(135deg, #6b5cff, #4338ff);
  color: white;
}

/* ========== NEWSLETTER SECTION ========== */
.newsletter {
  width: 90%;
  max-width: 1400px;
  margin: 40px auto 80px;
  background: white;
  border-radius: 25px;
  padding: 45px 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.newsletter-left {
  display: flex;
  align-items: center;
  gap: 25px;
}

.mail-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ede9ff, #e8e6ff);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  color: #4f46ff;
}

.newsletter-left h2 {
  margin-bottom: 10px;
  font-size: 28px;
  color: #081028;
}

.newsletter-left p {
  color: #667085;
  font-size: 15px;
}

.newsletter-right {
  display: flex;
  gap: 0;
}

.newsletter-right input {
  width: 320px;
  border: 1px solid #e2e8f0;
  border-radius: 12px 0 0 12px;
  padding: 14px 18px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fafbff;
}

.newsletter-right input:focus {
  border-color: #4f46ff;
  box-shadow: 0 0 0 2px rgba(79, 70, 255, 0.1);
}

.newsletter-right button {
  border: none;
  padding: 14px 28px;
  background: linear-gradient(135deg, #6b5cff, #4338ff);
  color: white;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.newsletter-right button:hover {
  transform: translateX(3px);
  box-shadow: 0 5px 15px rgba(107, 92, 255, 0.3);
}

/* ========== FOOTER ========== */
.footer {
  background: #1a1a2e;
  color: #cbd5e1;
  margin-top: 80px;
  padding: 50px 5% 30px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.footer-logo i {
  font-size: 28px;
  color: #4f46ff;
}

.footer-logo h3 {
  color: white;
  font-size: 22px;
  margin: 0;
}

.footer-section p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-section h3 {
  color: white;
  font-size: 18px;
  margin-bottom: 20px;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section a:hover {
  color: #4f46ff;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid #334155;
  font-size: 13px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
  .navbar {
    padding: 0 28px;
  }

  .nav-menu {
    gap: 10px;
  }

  .nav-menu li a {
    padding: 10px 12px;
    font-size: 14px;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .small-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .navbar {
    height: 76px;
    padding: 0 20px;
    flex-direction: row;
  }

  .logo h2 {
    font-size: 21px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 21px;
  }

  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    padding: 0 20px;
    border-bottom: 1px solid #ececf8;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    transition: all 0.35s ease;
  }

  .nav-toggle:checked ~ .nav-menu {
    max-height: 80vh;
    visibility: visible;
    opacity: 1;
    padding: 16px 20px 22px;
  }

  .nav-menu li a {
    text-align: center;
    padding: 13px 15px;
    border-radius: 12px;
  }

  .nav-toggle:checked + .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked + .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box input {
    width: 100%;
  }
  
  .blog-hero h1 {
    font-size: 48px;
  }
  
  .newsletter {
    flex-direction: column;
    text-align: center;
    padding: 35px;
  }
  
  .newsletter-left {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .small-posts {
    grid-template-columns: 1fr;
  }
  
  .blog-hero h1 {
    font-size: 36px;
  }
  
  .blog-hero p {
    font-size: 16px;
  }
  
  .tabs {
    justify-content: center;
  }
  
  .tab {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .newsletter-right {
    flex-direction: column;
    width: 100%;
  }
  
  .newsletter-right input {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  
  .newsletter-right button {
    border-radius: 12px;
    width: 100%;
  }
  
  .pagination button {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  
  .small-card {
    padding: 12px;
  }
  
  .small-card img {
    width: 65px;
    height: 65px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-section a:hover {
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 14px;
  }

  .logo {
    gap: 10px;
  }

  .logo h2 {
    font-size: 19px;
  }

  .blog-hero {
    padding: 60px 16px;
  }

  .blog-hero h1 {
    font-size: 28px;
  }
  
  .badge {
    font-size: 11px;
  }
  
  .blog-body h2,
  .blog-body h3 {
    font-size: 18px;
  }
  
  .newsletter-left h2 {
    font-size: 22px;
  }
  
  .mail-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .pagination {
    gap: 6px;
  }
  
  .pagination button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar,
  .filters,
  .pagination,
  .newsletter,
  .footer {
    display: none;
  }
  
  .blog-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .blog-hero {
    background: none;
    padding: 20px;
  }
  
  body {
    background: white;
  }
}

/* ========== LOADING STATES ========== */
.blog-image img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

::selection {
  background: #4f46ff;
  color: white;
}

::-moz-selection {
  background: #4f46ff;
  color: white;
}