/* Blog Page CSS for The Dotcom Entrepreneur - blog.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* Base styles (if not already included) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
  color: #333;
  background: #ffffff;
  overflow-x: hidden;
}

/* Reading Progress Bar */
html {
  --scroll-progress: 0%;
}

html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: var(--scroll-progress);
  height: 3px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  z-index: 1001;
  transition: width 0.1s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation (matching main site) */
header {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 2px solid #FFD700;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFD700;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-family: 'Playfair Display', serif;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #FFD700;
}

.small {
  font-size: 0.875rem;
  color: #ccc;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #FFD700;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #FFD700;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}

.nav-toggle:hover {
  transform: scale(1.1);
}

.hamburger {
  display: block;
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    transform: translateY(-100vh);
    transition: transform 0.3s ease;
    border-top: 2px solid #FFD700;
  }
  
  .nav-links.nav-active {
    transform: translateY(0);
  }
  
  .nav-links a {
    font-size: 1.2rem;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
  }
  
  .nav-toggle.active .hamburger {
    transform: rotate(45deg);
  }
}

/* Main Content */
.blog-page {
  margin-top: 90px;
  padding: 2rem 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #000;
  margin-bottom: 1.5rem;
  position: relative;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #000;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.8;
  color: #444;
}

/* Blog Hero Section */
.blog-hero {
  text-align: center;
  padding: 3rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  margin: 0 -20px 3rem;
}

.blog-hero h1 {
  margin-bottom: 1rem;
}

.subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Blog Content Section */
.blog-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Blog Post Styling */
.blog-post {
  background: #fff;
  border-radius: 20px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  overflow: hidden;
  position: relative;
}

.blog-post::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 215, 0, 0.3);
}

.blog-post img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-post:hover img {
  transform: scale(1.05);
}

.blog-post .content {
  padding: 2.5rem;
}

.blog-post h2 {
  color: #000;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.blog-post h2::after {
  display: none; /* Remove the underline from h2 in blog posts */
}

.blog-post p {
  color: #555;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.blog-post p strong {
  color: #000;
  font-weight: 600;
}

/* Lists Styling */
.blog-post ol,
.blog-post ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-post li {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.blog-post li strong {
  color: #000;
  font-weight: 600;
}

.blog-post ol li {
  padding-left: 0.5rem;
}

.blog-post ul li {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.blog-post ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #FFD700;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  border: 2px solid transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

/* Blog CTA Section */
.blog-cta {
  background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
  color: #fff;
  padding: 3rem 2rem;
  border-radius: 20px;
  text-align: center;
  margin: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23FFD700" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23FFD700" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
}

.blog-cta h3 {
  color: #FFD700;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

.blog-cta p {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background: #000;
  color: #fff;
  padding: 3rem 0 2rem;
  border-top: 2px solid #FFD700;
  text-align: center;
  margin-top: 4rem;
}

footer .container > div {
  margin-bottom: 1rem;
}

footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #FFD700;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Blog Post Animations */
.blog-post {
  animation: fadeInUp 0.6s ease forwards;
}

.blog-post:nth-child(even) {
  animation-delay: 0.1s;
}

.blog-post:nth-child(odd) {
  animation-delay: 0.2s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reading Experience Enhancements */
.blog-post .content p:first-of-type {
  font-size: 1.2rem;
  color: #333;
  font-weight: 500;
}

.blog-post .content p:first-of-type::first-letter {
  font-size: 3rem;
  font-weight: 700;
  color: #FFD700;
  float: left;
  line-height: 2.5rem;
  margin: 0.2rem 0.5rem 0 0;
  font-family: 'Playfair Display', serif;
}

/* Quote Styling for Emphasis */
.blog-post em {
  font-style: italic;
  color: #FFD700;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-page {
    margin-top: 80px;
    padding: 1rem 15px;
  }
  
  .blog-hero {
    padding: 2rem 1rem;
    margin: 0 -15px 2rem;
  }
  
  .blog-post {
    margin-bottom: 2rem;
  }
  
  .blog-post .content {
    padding: 2rem;
  }
  
  .blog-post img {
    height: 200px;
  }
  
  .blog-cta {
    padding: 2rem 1.5rem;
    margin: 3rem 0 2rem;
  }
  
  .blog-post ol,
  .blog-post ul {
    margin-left: 1rem;
  }
  
  .blog-post .content p:first-of-type::first-letter {
    font-size: 2.5rem;
    line-height: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .blog-page {
    padding: 1rem 10px;
  }
  
  .blog-post .content {
    padding: 1.5rem;
  }
  
  .blog-post img {
    height: 180px;
  }
  
  .blog-cta {
    padding: 2rem 1rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .blog-post ol,
  .blog-post ul {
    margin-left: 0.5rem;
  }
  
  .blog-post li {
    font-size: 1rem;
  }
  
  .blog-post .content p:first-of-type::first-letter {
    font-size: 2rem;
    line-height: 1.5rem;
    margin-right: 0.3rem;
  }
}

/* Print Styles */
@media print {
  header, footer, .blog-cta {
    display: none !important;
  }
  
  .blog-page {
    margin-top: 0 !important;
  }
  
  .blog-post {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    margin-bottom: 2rem !important;
    page-break-inside: avoid;
  }
  
  .blog-post img {
    max-height: 200px !important;
  }
  
  h1 {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
  
  html::before {
    display: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .blog-post {
    border: 2px solid #000;
  }
  
  .blog-post p,
  .blog-post li {
    color: #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html::before {
    transition: none;
  }
  
  .blog-post {
    animation: none;
  }
}

/* Focus States for Accessibility */
a:focus,
button:focus,
.btn:focus {
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

/* Dark Mode Media Query (Optional Enhancement) */
@media (prefers-color-scheme: dark) {
  body {
    background: #1a1a1a;
    color: #e0e0e0;
  }
  
  .blog-post {
    background: #2a2a2a;
    color: #e0e0e0;
  }
  
  .blog-post p,
  .blog-post li {
    color: #ccc;
  }
  
  .blog-post h2 {
    color: #FFD700;
  }
  
  .blog-hero {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  }
  
  .subtitle {
    color: #bbb;
  }
}

/* Enhanced Readability */
.blog-post .content {
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improved List Spacing */
.blog-post ol li,
.blog-post ul li {
  margin-bottom: 0.6rem;
}

.blog-post ol li:last-child,
.blog-post ul li:last-child {
  margin-bottom: 0;
}

/* Blog Post Hover Effects */
.blog-post:hover .content h2 {
  color: #FFD700;
  transition: color 0.3s ease;
}

/* Mobile Menu Enhancement */
@media (max-width: 768px) {
  .nav-links a {
    transition: all 0.3s ease;
  }
  
  .nav-links a:hover {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
  }
}
