/* Custom styles for Gadget Diary */

/* Modern font stack */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Improved background */
.bg-black {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

/* Modern color scheme */
.fw4 {
  font-weight: 500;
}

/* Better link styles */
.link {
  color: #28a745;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.link:hover {
  color: #1e7e34;
  text-decoration: none;
}

.link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #28a745;
  transition: width 0.3s ease;
}

.link:hover::after {
  width: 100%;
}

/* Enhanced card-like appearance for posts */
.relative.w-100.mb4 {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
}

.relative.w-100.mb4:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border-color: #28a745;
}

.relative.w-100.mb4::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #28a745 0%, #1e7e34 100%);
}

/* Post content styling */
.relative.w-100.mb4 .f5 {
  margin-bottom: 0.5rem;
  color: #333;
  font-weight: 600;
}

.relative.w-100.mb4 .f6 {
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.relative.w-100.mb4 .measure {
  margin-bottom: 1rem;
}

/* Header improvements */
.f3, .f4, .f5, .f6 {
  line-height: 1.4;
  margin-bottom: 1rem;
}

/* Button styles */
button.br3, .br3.button, a.br3 {
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

button.br3:hover, .br3.button:hover, a.br3:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Hero section styling */
.bg-center.cover {
  min-height: 60vh;
  position: relative;
}

.bg-center.cover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.pa3.pa4-ns.w-100.w-70-ns.center .f4.tc-l.center.measure-wide.lh-copy.mid-gray {
  position: relative;
  z-index: 2;
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Navigation styling */
.nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e0e0e0;
}

.nav a {
  color: #333 !important;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #28a745 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .relative.w-100.mb4 {
    margin-bottom: 1.5rem;
    padding: 1rem;
  }

  .relative.w-100.mb4:hover {
    transform: none;
  }

  .bg-center.cover {
    min-height: 40vh;
  }
}

/* Additional spacing */
.pa3.pa4-ns {
  padding: 2rem !important;
}

.w-100.mw8 {
  max-width: 1200px;
}

/* Hide featured images on homepage recent posts for desktop and tablet */
@media (min-width: 768px) {
  .relative.w-100.mb4 .featured-image-container {
    display: none !important;
  }
}

/* Remove pv4 padding on desktop for homepage blog cards */
@media (min-width: 768px) {
  .relative.w-100.mb4 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Reduce header padding on pages */
.pv3.pv4-l, .pv4-l, .pv6-l {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

/* Specific for page headers */
.page .pv6-l {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* Reduce header padding on blog posts */
article header {
  margin-top: 1rem !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* Tag styling */
.tags a {
  background: #f0f0f0;
  color: #666;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  transition: all 0.3s ease;
}

.tags a:hover {
  background: #28a745;
  color: #fff;
}

/* Responsive images */
article img {
  max-width: 100%;
  height: auto;
}

/* Blog post title size on mobile */
@media (max-width: 767px) {
  article h1.f1.athelas {
    font-size: 1.5rem !important;
  }

  .nested-copy-line-height.lh-copy.serif.f4.nested-links.nested-img.mid-gray.pr4-l.w-two-thirds-l p {
    font-size: 1rem !important;
  }

  .tc-l.pv6.ph3.ph4-ns {
    padding-top: 0 !important;
    padding-bottom: 8px !important;
  }

  .mb4.w-100.featured-image-container {
    margin-bottom: 0 !important;
  }

  .db.pv4.ph3.ph0-l.no-underline.dark-gray {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  h1.f3.fw1.athelas.mt0.lh-title {
    font-size: 1.2rem !important;
  }
}

/* Blog title size on mobile */
@media (max-width: 767px) {
  .relative.w-100.w-30-l.mb4.bg-white h1.f3 {
    font-size: 1.5rem !important;
  }

  .relative.w-100.w-30-l.mb4.bg-white .f6.f5-l {
    font-size: 1rem !important;
  }
}