/*=====================================================
    Blog Single Post / Inner Page Styles
    Theme: Nihon Infotech
    Description: Comprehensive styling for blog detail pages
=======================================================*/

/* ============================================
   1. MAIN BLOG CONTENT CONTAINER
============================================ */
.single-post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #4a4a68;
    font-family: 'Fustat', sans-serif;
}

/* ============================================
   2. TYPOGRAPHY STYLES
============================================ */

/* Main Heading (H1) */
.single-post-content h1 {
    font-size: 32px;
    line-height: 1.4;
    color: #050748;
    font-weight: 700;
    margin-bottom: 25px;
    margin-top: 0;
    font-family: 'Fustat', sans-serif;
}

/* Section Headings (H2) */
.single-post-content h2 {
    font-size: 28px;
    line-height: 1.4;
    color: #050748;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    font-family: 'Fustat', sans-serif;
    position: relative;
    padding-bottom: 12px;
}

.single-post-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
    border-radius: 3px;
}

/* Sub Headings (H3) */
.single-post-content h3 {
    font-size: 22px;
    line-height: 1.4;
    color: #050748;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    font-family: 'Fustat', sans-serif;
}

/* H4, H5, H6 */
.single-post-content h4 {
    font-size: 20px;
    line-height: 1.4;
    color: #050748;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 12px;
    font-family: 'Fustat', sans-serif;
}

.single-post-content h5 {
    font-size: 18px;
    line-height: 1.4;
    color: #050748;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: 'Fustat', sans-serif;
}

.single-post-content h6 {
    font-size: 16px;
    line-height: 1.4;
    color: #050748;
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 10px;
    font-family: 'Fustat', sans-serif;
}

/* Paragraphs */
.single-post-content p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #4a4a68;
}

.single-post-content p:last-child {
    margin-bottom: 0;
}

/* Emphasis and Strong */
.single-post-content em {
    font-style: italic;
    color: #6a6a8e;
    font-size: 18px;
    display: block;
    margin: 20px 0;
    padding-left: 20px;
    border-left: 3px solid #e91e63;
    line-height: 1.6;
}

.single-post-content strong {
    font-weight: 700;
    color: #050748;
}

/* ============================================
   3. LISTS STYLING
============================================ */

/* Unordered Lists */
.single-post-content ul {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.single-post-content ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    line-height: 1.7;
    color: #4a4a68;
}

.single-post-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #e91e63;
    font-weight: bold;
    font-size: 16px;
}

/* Ordered Lists */
.single-post-content ol {
    margin: 20px 0;
    padding-left: 25px;
    counter-reset: custom-counter;
    list-style: none;
}

.single-post-content ol li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 12px;
    line-height: 1.7;
    color: #4a4a68;
    counter-increment: custom-counter;
}

.single-post-content ol li::before {
    content: counter(custom-counter) ".";
    position: absolute;
    left: -25px;
    top: 0;
    color: #e91e63;
    font-weight: 700;
    font-size: 17px;
}

/* Nested Lists */
.single-post-content ul ul,
.single-post-content ol ol,
.single-post-content ul ol,
.single-post-content ol ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* ============================================
   4. TABLES STYLING
============================================ */
.single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.single-post-content table thead {
    background: linear-gradient(135deg, #e91e63 0%, #ff6b9d 100%);
}

.single-post-content table thead tr th {
    padding: 15px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Fustat', sans-serif;
}

.single-post-content table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.single-post-content table tbody tr:hover {
    background: #f9f9f9;
}

.single-post-content table tbody tr:last-child {
    border-bottom: none;
}

.single-post-content table tbody tr td {
    padding: 15px;
    color: #4a4a68;
    font-size: 15px;
    border: 1px solid #e8e8e8;
}

.single-post-content table tbody tr:nth-child(odd) {
    background: #fafafa;
}

/* ============================================
   5. STYLED DIVS & INFO BOXES
============================================ */

/* Info/Highlight Boxes */
.single-post-content div[style*="background"] {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.single-post-content div[style*="background"]:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Case Study Boxes */
.single-post-content div[style*="background: #f4f4f4"] h3 {
    color: #050748;
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 15px;
}

/* Warning/Alert Boxes */
.single-post-content div[style*="background: #fff3cd"] {
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
}

/* CTA Gradient Boxes */
.single-post-content div[style*="gradient"] {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.single-post-content div[style*="gradient"] h3 {
    color: #fff !important;
}

.single-post-content div[style*="gradient"] p {
    color: rgba(255, 255, 255, 0.95);
}

/* Primary CTA Box */
.single-post-content div[style*="background: #e91e63"] {
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.3);
}

.single-post-content div[style*="background: #e91e63"] h3 {
    color: #fff !important;
}

.single-post-content div[style*="background: #e91e63"] p {
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   6. LINKS & BUTTONS
============================================ */
.single-post-content a {
    color: #e91e63;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.single-post-content a:hover {
    color: #c2185b;
    text-decoration: underline;
}

/* Button Links */
.single-post-content a[style*="display: inline-block"] {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.single-post-content a[style*="display: inline-block"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

/* Primary Buttons (White BG) */
.single-post-content a[style*="background: white"] {
    background: #fff !important;
}

.single-post-content a[style*="background: white"]:hover {
    background: #f8f8f8 !important;
}

/* Outlined Buttons */
.single-post-content a[style*="border: 2px solid white"]:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   7. HORIZONTAL RULES
============================================ */
.single-post-content hr {
    margin: 40px 0;
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #e0e0e0 20%, #e0e0e0 80%, transparent);
}

/* ============================================
   8. BLOCKQUOTES
============================================ */
.single-post-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    background: #f8f9fa;
    border-left: 4px solid #e91e63;
    font-style: italic;
    color: #6a6a8e;
    border-radius: 0 8px 8px 0;
}

.single-post-content blockquote p {
    margin-bottom: 0;
}

/* ============================================
   9. CODE BLOCKS
============================================ */
.single-post-content code {
    background: #f4f4f4;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e91e63;
}

.single-post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.single-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ============================================
   10. IMAGES
============================================ */
.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.single-post-content img:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ============================================
   11. SPECIAL ELEMENTS
============================================ */

/* Checkboxes in Lists */
.single-post-content li:has(input[type="checkbox"]) {
    list-style: none;
}

/* Emoji Support */
.single-post-content {
    font-feature-settings: "liga", "clig";
}

/* ============================================
   12. RESPONSIVE DESIGN
============================================ */
@media (max-width: 991px) {
    .single-post-content {
        font-size: 16px;
    }

    .single-post-content h1 {
        font-size: 28px;
    }

    .single-post-content h2 {
        font-size: 24px;
        margin-top: 35px;
    }

    .single-post-content h3 {
        font-size: 20px;
    }

    .single-post-content table {
        font-size: 14px;
    }

    .single-post-content table thead tr th,
    .single-post-content table tbody tr td {
        padding: 12px 10px;
    }
}

@media (max-width: 767px) {
    .single-post-content {
        font-size: 15px;
    }

    .single-post-content h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .single-post-content h2 {
        font-size: 22px;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .single-post-content h3 {
        font-size: 18px;
        margin-top: 25px;
    }

    .single-post-content em {
        font-size: 16px;
        padding-left: 15px;
    }

    .single-post-content ul li,
    .single-post-content ol li {
        padding-left: 25px;
    }

    /* Stack Tables on Mobile */
    .single-post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* CTA Buttons Full Width */
    .single-post-content a[style*="display: inline-block"] {
        display: block !important;
        margin: 10px 0 !important;
        text-align: center;
    }

    .single-post-content div[style*="text-align: center"] {
        padding: 20px 15px !important;
    }

    .single-post-content hr {
        margin: 30px 0;
    }
}

@media (max-width: 576px) {
    .single-post-content h1 {
        font-size: 22px;
    }

    .single-post-content h2 {
        font-size: 20px;
    }

    .single-post-content h3 {
        font-size: 17px;
    }

    .single-post-content table thead tr th,
    .single-post-content table tbody tr td {
        padding: 10px 8px;
        font-size: 13px;
    }
}

/* ============================================
   13. PRINT STYLES
============================================ */
@media print {
    .single-post-content {
        font-size: 12pt;
        color: #000;
    }

    .single-post-content a {
        color: #000;
        text-decoration: underline;
    }

    .single-post-content a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }

    .single-post-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }

    .single-post-content h1,
    .single-post-content h2,
    .single-post-content h3 {
        page-break-after: avoid;
    }
}

/* ============================================
   14. ACCESSIBILITY
============================================ */
.single-post-content a:focus,
.single-post-content button:focus {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

.single-post-content *:focus-visible {
    outline: 2px solid #e91e63;
    outline-offset: 2px;
}

/* ============================================
   15. SMOOTH SCROLLING
============================================ */
.single-post-content {
    scroll-behavior: smooth;
}

/* ============================================
   16. SELECTION STYLES
============================================ */
.single-post-content ::selection {
    background: rgba(233, 30, 99, 0.2);
    color: #050748;
}

.single-post-content ::-moz-selection {
    background: rgba(233, 30, 99, 0.2);
    color: #050748;
}

/* ============================================
   17. DARK MODE SUPPORT (Optional)
============================================ */
@media (prefers-color-scheme: dark) {
    .dark-mode .single-post-content {
        color: #d0d0d0;
    }

    .dark-mode .single-post-content h1,
    .dark-mode .single-post-content h2,
    .dark-mode .single-post-content h3,
    .dark-mode .single-post-content h4,
    .dark-mode .single-post-content h5,
    .dark-mode .single-post-content h6,
    .dark-mode .single-post-content strong {
        color: #ffffff;
    }

    .dark-mode .single-post-content p,
    .dark-mode .single-post-content li {
        color: #c0c0c0;
    }

    .dark-mode .single-post-content div[style*="background: #f4f4f4"] {
        background: #2a2a2a !important;
    }

    .dark-mode .single-post-content table tbody tr {
        background: #1e1e1e;
    }

    .dark-mode .single-post-content table tbody tr:nth-child(odd) {
        background: #252525;
    }

    .dark-mode .single-post-content code {
        background: #2d2d2d;
        color: #ff6b9d;
    }
}

