/* ══════════════════════════════════════════════════
   Everyday AI with Brian — Shared Styles
   ══════════════════════════════════════════════════ */

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

body {
  font-family: 'Inter', sans-serif;
  background: #0d1117;
  color: #e6edf3;
  overflow-x: hidden;
}

/* ── VIDEO BACKGROUND SYSTEM ── */
.video-bg-container {
  position: relative;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-bg-container::before,
.video-bg-container::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 2;
  pointer-events: none;
}

.video-bg-container::before {
  top: 0;
  background: linear-gradient(to bottom, #0d1117 0%, transparent 100%);
}

.video-bg-container::after {
  bottom: 0;
  background: linear-gradient(to top, #0d1117 0%, transparent 100%);
}

.video-bg-container > *:not(.video-bg):not(.video-overlay) {
  position: relative;
  z-index: 2;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #e6edf3;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

header .logo img {
  height: 50px;
  width: auto;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

header .logo-img-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88,166,255,0.4) 0%, transparent 70%);
  animation: logoPulse 3s ease-in-out infinite;
  z-index: 0;
}

header .logo:hover img {
  transform: scale(1.15);
}

header .logo:hover .logo-img-wrap::after {
  animation: none;
  background: radial-gradient(circle, rgba(88,166,255,0.7) 0%, transparent 70%);
}

@keyframes logoPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

header .logo span { color: #58a6ff; }

nav a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #8b949e;
  text-decoration: none;
  margin-left: 28px;
  transition: color 0.2s;
}

nav a:hover { color: #58a6ff; }

/* ── SECTIONS ── */
.section {
  max-width: 960px;
  margin: 0 auto;
  padding: 80px 20px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #58a6ff;
  margin-bottom: 12px;
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 16px;
}

.section .lead {
  font-size: 1rem;
  color: #8b949e;
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 50px;
}

/* ── BUTTONS ── */
.btn-primary {
  background: #58a6ff;
  color: #0d1117;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover { background: #79b8ff; transform: translateY(-1px); }

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #e6edf3;
  text-decoration: none;
  padding: 13px 30px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.2s, transform 0.2s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

/* ── CARD GRID ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 8px;
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: #58a6ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88, 166, 255, 0.08);
}

.card .card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.87rem;
  color: #8b949e;
  line-height: 1.65;
  margin-bottom: 16px;
}

.card a {
  font-size: 0.8rem;
  color: #58a6ff;
  text-decoration: none;
  font-weight: 500;
}

.card a:hover { text-decoration: underline; }

/* ── PRODUCT CARDS (with images) ── */
.product-card {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: #58a6ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(88, 166, 255, 0.1);
}

.product-card .product-img {
  width: 100%;
  height: 180px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.product-card .product-img img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: transform 0.3s;
}

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

.product-card .product-info {
  padding: 20px;
}

.product-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.product-card p {
  font-size: 0.85rem;
  color: #8b949e;
  line-height: 1.65;
  margin-bottom: 14px;
}

.product-card .product-link {
  display: inline-block;
  font-size: 0.8rem;
  color: #58a6ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.product-card .product-link:hover {
  color: #79b8ff;
  text-decoration: underline;
}

/* ── VIDEO REVIEW BUTTON (hidden until data-review is set) ── */
.product-card .review-btn {
  display: none;
  margin-top: 10px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.product-card .review-btn:hover {
  background: rgba(255,255,255,0.15);
}

.product-card[data-review] .review-btn {
  display: inline-block;
}

/* Video review modal/embed */
.review-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.review-overlay.active {
  display: flex;
}

.review-overlay .review-player {
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
}

.review-overlay .review-player iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.review-overlay .review-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* ── CATEGORY CARDS (for main page tools section) ── */
.category-card {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  border-color: #58a6ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(88, 166, 255, 0.1);
}

.category-card .cat-img {
  width: 100%;
  height: 160px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.category-card .cat-img img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: transform 0.3s;
}

.category-card:hover .cat-img img {
  transform: scale(1.05);
}

.category-card .cat-info {
  padding: 20px;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 6px;
}

.category-card .cat-count {
  font-size: 0.78rem;
  color: #8b949e;
  margin-bottom: 12px;
}

.category-card .cat-browse {
  font-size: 0.8rem;
  color: #58a6ff;
  font-weight: 500;
}

/* ── GEAR PAGE HEADER ── */
.gear-header {
  padding: 120px 20px 60px;
  text-align: center;
}

.gear-header .back-link {
  display: inline-block;
  font-size: 0.82rem;
  color: #8b949e;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.gear-header .back-link:hover { color: #58a6ff; }

.gear-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 12px;
}

.gear-header p {
  font-size: 1rem;
  color: #8b949e;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── FOOTER ── */
footer {
  background: #0d1117;
  border-top: 1px solid #30363d;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.8rem;
  color: #484f58;
  line-height: 1.8;
}

footer a { color: #58a6ff; text-decoration: none; }
footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ── SCROLL FADE-IN ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BLOG LISTING ── */
.blog-card {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(48, 54, 61, 0.8);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  border-color: #58a6ff;
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(88, 166, 255, 0.1);
}

.blog-card .blog-thumb {
  width: 100%;
  height: 200px;
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.blog-card .blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.blog-card .blog-card-body {
  padding: 20px;
}

.blog-card .blog-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: #8b949e;
}

.blog-meta .blog-date {
  color: #8b949e;
}

.blog-meta .blog-tag {
  background: rgba(88, 166, 255, 0.15);
  border: 1px solid rgba(88, 166, 255, 0.3);
  color: #58a6ff;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.blog-card .blog-excerpt {
  font-size: 0.85rem;
  color: #8b949e;
  line-height: 1.65;
  margin-bottom: 14px;
}

.blog-card .blog-read-more {
  font-size: 0.8rem;
  color: #58a6ff;
  font-weight: 500;
}

/* ── BLOG ARTICLE ── */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.blog-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 40px 0 16px;
}

.blog-article h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e6edf3;
  margin: 32px 0 12px;
}

.blog-article p {
  font-size: 0.95rem;
  color: #c9d1d9;
  line-height: 1.85;
  margin-bottom: 20px;
}

.blog-article ul, .blog-article ol {
  margin: 0 0 20px 24px;
  color: #c9d1d9;
  font-size: 0.95rem;
  line-height: 1.85;
}

.blog-article li {
  margin-bottom: 8px;
}

.blog-article a {
  color: #58a6ff;
  text-decoration: none;
}

.blog-article a:hover {
  text-decoration: underline;
}

.blog-article a.btn-primary {
  color: #0d1117;
}

.blog-article a.btn-primary:hover {
  text-decoration: none;
}

.blog-article blockquote {
  border-left: 3px solid #58a6ff;
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(88, 166, 255, 0.05);
  border-radius: 0 6px 6px 0;
  color: #c9d1d9;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* YouTube embed */
.blog-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  margin: 30px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(48, 54, 61, 0.8);
}

.blog-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Gear grid inside blog posts */
.blog-gear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 30px 0;
}

/* Blog header (post page) */
.blog-hero {
  padding: 120px 20px 50px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.blog-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-hero .blog-meta {
  justify-content: center;
  margin-bottom: 0;
}

/* Blog CTA box */
.blog-cta {
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  margin: 40px 0;
}

.blog-cta h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.blog-cta p {
  margin-bottom: 20px;
  color: #8b949e;
}

/* Post navigation */
.blog-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #30363d;
}

.blog-nav a {
  font-size: 0.85rem;
  color: #58a6ff;
  text-decoration: none;
  font-weight: 500;
}

.blog-nav a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  header { padding: 14px 20px; }
  nav a { margin-left: 16px; font-size: 0.75rem; }
  .video-bg { display: none; }
  .gear-header h1 { font-size: 1.8rem; }
  .gear-header { padding: 100px 20px 40px; }
  .blog-hero h1 { font-size: 1.6rem; }
  .blog-hero { padding: 100px 20px 40px; }
  .blog-nav { flex-direction: column; }
}
