/*
Theme Name: Aung Ramadhan Blog Theme
Description: A clean, text-focused WordPress theme based on Aung Ramadhan's blog design. Perfect for writers and bloggers who want a minimal, reading-focused experience.
Version: 1.0
Author: Your Name
*/

/* This file contains only the theme information. The actual styles are loaded from the original CSS files. */

/* WordPress Content Styling - Heading Support */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    font-family: 'Unna', serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.5em 0 !important;
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
    color: #333;
    letter-spacing: 0.25px;
}

.blog-content h1 {
    font-size: 2.2em;
}

.blog-content h2 {
    font-size: 1.8em;
}

.blog-content h3 {
    font-size: 1.5em;
}

.blog-content h4 {
    font-size: 1.3em;
}

.blog-content h5 {
    font-size: 1.1em;
}

.blog-content h6 {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure proper spacing for content */
.blog-content p {
    margin: 1em 0 !important;
    margin-top: 1em !important;
    margin-bottom: 1em !important;
    line-height: 1.6;
}

.blog-content ul,
.blog-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.blog-content li {
    margin: 0.5em 0;
}

.blog-content blockquote {
    border-left: 4px solid #007cba;
    padding-left: 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop image constraints */
@media (min-width: 769px) {
    .blog-content {
        max-width: 100%;
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .blog-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        max-height: 500px !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 auto !important;
    }
    
    /* Specific fixes for large images */
    .blog-content img[width],
    .blog-content img[height] {
        max-width: 100% !important;
        max-height: 500px !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Force all images to be contained */
    .blog-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Responsive images for mobile */
@media (max-width: 768px) {
    .blog-content img {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin: 0.5em 0;
        border-radius: 4px;
    }
    
    /* Ensure images don't overflow on mobile */
    .blog-content {
        overflow-x: hidden;
    }
    
    /* Fix for WordPress image blocks */
    .blog-content .wp-block-image {
        margin: 0.5em 0;
    }
    
    .blog-content .wp-block-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
    
    /* Fix for figure elements */
    .blog-content figure {
        margin: 0.5em 0;
        max-width: 100%;
    }
    
    .blog-content figure img {
        width: 100%;
        height: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-content img {
        margin: 0.25em 0;
        border-radius: 2px;
    }
    
    .blog-content .wp-block-image {
        margin: 0.25em 0;
    }
    
    .blog-content figure {
        margin: 0.25em 0;
    }
}

.blog-content a {
    color: #007cba;
    text-decoration: none;
}

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

/* WordPress Editor Styles */
.wp-block-heading h1,
.wp-block-heading h2,
.wp-block-heading h3,
.wp-block-heading h4,
.wp-block-heading h5,
.wp-block-heading h6,
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
    font-family: 'Unna', serif;
    font-weight: 700;
    line-height: 1.3;
    margin: 1em 0 !important;
    margin-top: 1em !important;
    margin-bottom: 1em !important;
    color: #333;
    letter-spacing: 0.25px;
}

.wp-block-heading h1,
.editor-styles-wrapper h1 {
    font-size: 2.2em;
}

.wp-block-heading h2,
.editor-styles-wrapper h2 {
    font-size: 1.8em;
}

.wp-block-heading h3,
.editor-styles-wrapper h3 {
    font-size: 1.5em;
}

.wp-block-heading h4,
.editor-styles-wrapper h4 {
    font-size: 1.3em;
}

.wp-block-heading h5,
.editor-styles-wrapper h5 {
    font-size: 1.1em;
}

.wp-block-heading h6,
.editor-styles-wrapper h6 {
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure proper spacing in editor */
.editor-styles-wrapper p {
    margin: 1em 0;
    line-height: 1.6;
}

.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
    margin: 1em 0;
    padding-left: 2em;
}

.editor-styles-wrapper li {
    margin: 0.5em 0;
}

.editor-styles-wrapper blockquote {
    border-left: 4px solid #007cba;
    padding-left: 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
}

/* WordPress Editor Features Support */

/* Bulleted and Numbered Lists */
.blog-content ul,
.blog-content ol,
.editor-styles-wrapper ul,
.editor-styles-wrapper ol {
    margin: 1em 0;
    padding-left: 2em;
}

.blog-content ul li,
.editor-styles-wrapper ul li {
    list-style-type: disc;
    margin: 0.5em 0;
}

.blog-content ol li,
.editor-styles-wrapper ol li {
    list-style-type: decimal;
    margin: 0.5em 0;
}

/* Text Alignment Support */
.blog-content .alignleft,
.editor-styles-wrapper .alignleft {
    text-align: left;
    display: block;
}

.blog-content .aligncenter,
.editor-styles-wrapper .aligncenter {
    text-align: center;
    display: block;
}

.blog-content .alignright,
.editor-styles-wrapper .alignright {
    text-align: right;
    display: block;
}

.blog-content .alignjustify,
.editor-styles-wrapper .alignjustify {
    text-align: justify;
    display: block;
}

/* Read More Tag Support */
.blog-content .more-link,
.editor-styles-wrapper .more-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin: 1em 0;
}

.blog-content .more-link:hover,
.editor-styles-wrapper .more-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* WordPress More Tag Styling */
.blog-content .wp-more-tag,
.editor-styles-wrapper .wp-more-tag {
    display: none;
}

/* Table Support */
.blog-content table,
.editor-styles-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    border: 1px solid #ddd;
}

.blog-content th,
.blog-content td,
.editor-styles-wrapper th,
.editor-styles-wrapper td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.blog-content th,
.editor-styles-wrapper th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Strikethrough Support */
.blog-content del,
.blog-content s,
.editor-styles-wrapper del,
.editor-styles-wrapper s {
    text-decoration: line-through;
    color: #666;
}

/* Horizontal Rule Support */
.blog-content hr,
.editor-styles-wrapper hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 2em 0;
}

/* Code Support */
.blog-content code,
.editor-styles-wrapper code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.blog-content pre,
.editor-styles-wrapper pre {
    background: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

.blog-content pre code,
.editor-styles-wrapper pre code {
    background: none;
    padding: 0;
}

/* Link Styling */
.blog-content a,
.editor-styles-wrapper a {
    color: #007cba;
    text-decoration: none;
}

.blog-content a:hover,
.editor-styles-wrapper a:hover {
    text-decoration: underline;
}

/* Image Alignment */
.blog-content .alignleft,
.editor-styles-wrapper .alignleft {
    float: left;
    margin: 0 1em 1em 0;
}

.blog-content .alignright,
.editor-styles-wrapper .alignright {
    float: right;
    margin: 0 0 1em 1em;
}

.blog-content .aligncenter,
.editor-styles-wrapper .aligncenter {
    display: block;
    margin: 0 auto 1em auto;
}

/* Clear floats */
.blog-content::after,
.editor-styles-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* Additional responsive image fixes */
.blog-content img,
.blog-content .wp-block-image img,
.blog-content figure img {
    box-sizing: border-box;
}

/* Fix for images with specific widths */
.blog-content img[width],
.blog-content img[height] {
    max-width: 100% !important;
    height: auto !important;
}

/* Fix for WordPress gallery images */
.blog-content .gallery img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

/* Fix for images in tables */
.blog-content table img {
    max-width: 100%;
    height: auto;
}

/* Ensure all content is responsive */
.blog-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .blog-content img {
        margin: 0.1em 0;
        border-radius: 1px;
    }
    
    .blog-content .wp-block-image {
        margin: 0.1em 0;
    }
    
    .blog-content figure {
        margin: 0.1em 0;
    }
}

/* Desktop specific fixes for WordPress blocks */
@media (min-width: 769px) {
    .blog-content .wp-block-image {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 auto !important;
    }
    
    .blog-content .wp-block-image img {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 500px !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    .blog-content figure {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        margin: 0 auto !important;
    }
    
    .blog-content figure img {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 500px !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    /* Fix for gallery images on desktop */
    .blog-content .gallery {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
    }
    
    .blog-content .gallery img {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 300px !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    /* Force all containers to respect boundaries */
    .blog-content div,
    .blog-content section,
    .blog-content article {
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

/* Pagination Styling */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    margin: 0 6px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 44px;
    height: 44px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.page-numbers::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.page-numbers:hover::before {
    left: 100%;
}

.page-numbers:hover {
    background-color: #f8f9fa;
    border-color: #ed407a;
    color: #ed407a;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 64, 122, 0.2);
}

.page-numbers.current {
    background-color: #ed407a !important;
    border-color: #ed407a !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(237, 64, 122, 0.3);
    transform: scale(1.05);
}

.page-numbers.prev,
.page-numbers.next {
    background-color: #ed407a !important;
    border-color: #ed407a !important;
    color: #fff !important;
    font-weight: 700;
    padding: 12px 24px;
    min-width: auto;
    position: relative;
}

.page-numbers.prev:hover,
.page-numbers.next:hover {
    background-color: #d6336c !important;
    border-color: #d6336c !important;
    color: #fff !important;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(237, 64, 122, 0.4);
}

.page-numbers.prev::before,
.page-numbers.next::before {
    display: none;
}

.page-numbers.prev::after {
    content: '';
}

.page-numbers.next::after {
    content: '';
}

.page-numbers.dots {
    background-color: transparent;
    border: none;
    color: #999;
    cursor: default;
    box-shadow: none;
    font-size: 18px;
    font-weight: bold;
}

.page-numbers.dots:hover {
    background-color: transparent;
    border: none;
    color: #999;
    transform: none;
    box-shadow: none;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 20px 0;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(237, 64, 122, 0.1);
}

.nav-links .page-numbers {
    margin: 0;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .page-numbers {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 40px;
        height: 40px;
        margin: 0 4px;
    }
    
    .page-numbers.prev,
    .page-numbers.next {
        padding: 10px 20px;
    }
    
    .nav-links {
        margin: 20px 0 15px 0;
        gap: 8px;
        padding: 20px 15px;
    }
    
}

@media (max-width: 480px) {
    .page-numbers {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 36px;
        height: 36px;
        margin: 0 2px;
    }
    
    .page-numbers.prev,
    .page-numbers.next {
        padding: 8px 16px;
    }
    
    .nav-links {
        margin: 15px 0 10px 0;
        gap: 6px;
        padding: 15px 10px;
    }
}