/* ============================================
   COMPLETE BLOG CSS - MODERN DESIGN
   ttdown.site Blog - All Issues Fixed
   Version: 2.1 - January 2026
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Blog Container */
.blog-container {
    min-height: 100vh;
    background: #f5f5f5;
}

/* ============================================
   BLOG HEADER - Purple/Blue Gradient
   ============================================ */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 20px 40px;
    color: white;
    text-align: center;
    position: relative;
}

/* Breadcrumb */
.blog-header .breadcrumb {
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.blog-header .breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    font-weight: 500;
    transition: opacity 0.3s;
}

.blog-header .breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Blog Title */
.blog-header h1 {
    font-size: 38px;
    margin: 0 0 12px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

/* Blog Subtitle */
.blog-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Blog Count */
.blog-count {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0;
}

/* ============================================
   BLOG GRID - Card Layout
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 25px;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   BLOG CARD - Modern Card Design
   ============================================ */
.blog-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

/* Featured Blog Card */
.blog-card.featured {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-left: 4px solid #667eea;
}

/* ============================================
   BLOG CARD HEADER
   ============================================ */
.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Category Badge */
.blog-category {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Date */
.blog-date {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   BLOG CARD CONTENT
   ============================================ */
.blog-card h2 {
    margin: 0 0 14px;
    font-size: 21px;
    line-height: 1.4;
    font-weight: 600;
}

.blog-card h2 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card h2 a:hover {
    color: #667eea;
}

/* Blog Description */
.blog-card > p {
    color: #5a5a5a;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 18px;
    flex-grow: 1;
}

/* ============================================
   BLOG META - Footer of Card
   ============================================ */
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
    margin-top: auto;
}

.blog-meta span {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

/* Read More Link */
.blog-meta .read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-meta .read-more:hover {
    color: #764ba2;
    gap: 8px;
}

/* ============================================
   BLOG CTA SECTION - Homepage
   ============================================ */
.blog-cta {
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
    margin: 40px auto 60px;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.blog-cta h2 {
    font-size: 30px;
    margin-bottom: 12px;
    color: #2d3748;
    font-weight: 700;
}

.blog-cta p {
    font-size: 17px;
    color: #5a5a5a;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* CTA Button - Homepage */
.blog-cta .cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.blog-cta .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* ============================================
   INDIVIDUAL BLOG POST STYLES
   ============================================ */

/* Blog Post Container */
.blog-post {
    max-width: 850px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    background: white;
}

/* Post Header */
.post-header {
    margin-bottom: 40px;
}

.post-header h1 {
    font-size: 36px;
    line-height: 1.3;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Post Category Badge */
.post-category {
    display: inline-block;
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

/* Breadcrumb in Post */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #888;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Post Content */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #2d3748;
}

/* ✅ FIX: reduce extra top margin on headings to prevent "double spacing" */
.post-content h2 {
    font-size: 28px;
    margin: 24px 0 20px;
    color: #2d3748;
    font-weight: 600;
}

.post-content h3 {
    font-size: 22px;
    margin: 22px 0 15px;
    color: #2d3748;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0 20px 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid #667eea;
}

.post-content a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

/* ============================================
   CTA SECTIONS IN BLOG POSTS
   ============================================ */

/* CTA Section Wrapper */
.cta-section,
.post-content .cta-section,
section.cta-section {
    margin: 50px 0;
}

/* CTA Box */
.cta-box,
.cta-section .cta-box,
.post-content .cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px;
    padding: 45px 35px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25);
}

/* Heading in CTA Box */
.cta-box h2,
.cta-box h3,
.cta-section h2,
.cta-section h3 {
    color: white !important;
    font-size: 30px;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

/* Paragraph in CTA Box */
.cta-box p,
.cta-section p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 17px;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* CTA Button */
.cta-box a,
.cta-box .cta-button,
.cta-section a,
.cta-section .cta-button,
.cta-box a[href],
.post-content .cta-box a {
    display: inline-block !important;
    padding: 18px 45px !important;
    background: white !important;
    color: #667eea !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 3px solid white !important;
    line-height: 1.4 !important;
}

/* Button Hover */
.cta-box a:hover,
.cta-box .cta-button:hover,
.cta-section a:hover,
.post-content .cta-box a:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25) !important;
    background: #f8f9ff !important;
    color: #764ba2 !important;
}

/* CTA Note */
.cta-box .cta-note,
.cta-section .cta-note {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px;
    margin-top: 15px;
    font-style: italic;
}

/* ============================================
   BACK TO BLOG LINK
   ============================================ */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.back-to-blog:hover {
    color: #764ba2;
    gap: 10px;
}

.back-to-blog::before {
    content: "←";
    font-size: 18px;
}

/* ============================================
   MOBILE RESPONSIVE - Under 768px
   ============================================ */
@media (max-width: 768px) {
    .blog-header {
        padding: 40px 15px 30px;
    }

    .blog-header h1 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .blog-subtitle {
        font-size: 15px;
        padding: 0 10px;
    }

    .blog-count {
        font-size: 13px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 35px 15px;
        gap: 20px;
    }

    .blog-card {
        padding: 22px;
    }

    .blog-card h2 {
        font-size: 19px;
    }

    .blog-card > p {
        font-size: 14px;
    }

    .blog-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .blog-cta {
        padding: 35px 20px;
        margin: 30px 15px 40px;
    }

    .blog-cta h2 {
        font-size: 24px;
    }

    .blog-cta p {
        font-size: 15px;
    }

    .blog-cta .cta-button {
        padding: 14px 32px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
    }

    .blog-post {
        padding: 30px 15px 60px;
    }

    .post-header h1 {
        font-size: 28px;
    }

    .post-content {
        font-size: 16px;
    }

    .post-content h2 {
        font-size: 24px;
        margin: 22px 0 16px;
    }

    .post-content h3 {
        font-size: 20px;
        margin: 18px 0 12px;
    }

    .cta-box,
    .cta-section .cta-box {
        padding: 35px 25px !important;
    }

    .cta-box h2,
    .cta-box h3 {
        font-size: 24px !important;
    }

    .cta-box p {
        font-size: 15px !important;
    }

    .cta-box a,
    .cta-box .cta-button,
    .cta-section a {
        padding: 15px 30px !important;
        font-size: 16px !important;
        width: calc(100% - 20px) !important;
        max-width: 100% !important;
    }
}

/* ============================================
   ADDITIONAL CONTENT SECTIONS
   ============================================ */

/* ✅ reduce content-section margin to prevent blank gaps */
.content-section {
    margin: 28px 0;
}

.content-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 600;
}

.content-section h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #2d3748;
    font-weight: 600;
}

/* Tips Box */
.tips-box {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
}

.tips-box h3 {
    color: #667eea;
    margin-bottom: 15px;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Step by Step Guide */
.step-by-step {
    margin: 24px 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.step-number {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.step-content h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

/* ============================================
   PATCH: FIX BIG BLANK SPACE BETWEEN SECTIONS
   ============================================ */
.content-section + .content-section { margin-top: 0; }
.content-section h2:first-child { margin-top: 0; }
.content-section h3:first-child { margin-top: 0; }
.content-section .feature-grid { margin-top: 16px; }
.content-section .step-by-step { margin-top: 16px; }
.content-section .comparison-table { margin-top: 16px; }

@media (max-width: 768px) {
    .content-section { margin: 22px 0; }
    .content-section + .content-section { margin-top: 0; }
    .content-section .feature-grid,
    .content-section .step-by-step,
    .content-section .comparison-table { margin-top: 12px; }
}

/* ============================================
   NEW: SOCIAL SHARE BLOCK (styles only)
   IMPORTANT: You must add HTML share links in index.php
   (to fix Seobility Social media warning) [Source](https://www.genspark.ai/api/files/s/lArJ1Qtr)
   ============================================ */
.social-share {
    margin: 28px 0;
    padding: 22px;
    background: #f8f9ff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.social-share h2 {
    margin: 0 0 12px;
}

.social-share p {
    margin: 0 0 16px;
    color: #4a5568;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: white;
    color: #2d3748;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.share-btn:hover {
    transform: translateY(-2px);
    border-color: #667eea;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.share-btn .icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 13px;
    line-height: 1;
}

/* Mobile share buttons full width */
@media (max-width: 768px) {
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   NEW: AUTHOR BOX (styles only)
   IMPORTANT: You must add HTML author box in index.php
   ============================================ */
.author-box {
    margin: 35px 0 10px;
    padding: 22px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
}

.author-info h3 {
    margin: 0 0 6px;
}

.author-info p {
    margin: 0;
    color: #5a5a5a;
    font-size: 15px;
    line-height: 1.6;
}

.author-links {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.author-links a {
    border-bottom: none;
    font-weight: 600;
    font-size: 14px;
}

/* Mobile author box */
@media (max-width: 768px) {
    .author-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   SHARE BAR (like screenshot)
   ========================= */
.share-bar{
  display:flex;
  width:100%;
  overflow:hidden;
  border-radius:10px;
  margin:14px 0 8px;
  box-shadow:0 3px 12px rgba(0,0,0,0.08);
}
.share-tile{
  flex:1;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
  border:0;
  cursor:pointer;
}
.share-tile .share-icon{
  display:flex;
  align-items:center;
  justify-content:center;
}
.share-fb{ background:#1877F2; }
.share-x{ background:#55ACEE; }
.share-pin{ background:#BD081C; }
.share-reddit{ background:#FF4500; }
.share-more{ background:#F59E0B; color:#fff; font-size:28px; font-weight:800; }
.share-more.copied{ background:#22C55E; }
.share-tile:focus{ outline:3px solid rgba(255,255,255,0.8); outline-offset:-3px; }

/* Non-clickable tags (no 404 pages) */
.post-tags .tag-chip{
  display:inline-block;
  margin-left:8px;
  padding:6px 12px;
  border-radius:16px;
  background:#f8f9ff;
  border:1px solid #e8e8e8;
  color:#667eea;
  font-weight:600;
  font-size:13px;
  line-height:1;
}


/* ============================================
   END OF FILE
   ============================================ */
