/*
Theme Name: mkmbix
Theme URI: https://mkm.cam/
Author: Your Name
Author URI: https://mkm.cam
Description: A blazing fast, fully mobile responsive WordPress theme with modern design, customizable colors, SEO optimized, AdSense ready, and complete overflow protection for tables, images, ads and all content types.
Version: 8.0.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mkmbix
Tags: blog, one-column, two-columns, right-sidebar, left-sidebar, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, responsive-layout, mobile-friendly

mkmbix Theme - Complete Mobile Responsive WordPress Theme
Developed with ❤️ for perfect mobile experience
*/

/* ============================================
   FALLBACK STYLES - In case dynamic CSS fails
   ============================================ */

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevent Horizontal Overflow */
html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1f2937;
    background-color: #f4f4f4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CRITICAL OVERFLOW PROTECTION
   ============================================ */

/* All Elements Max Width */
img,
table,
iframe,
embed,
object,
video,
audio,
pre,
code,
blockquote,
figure,
.wp-block-image,
.wp-block-table,
.wp-block-embed,
.wp-block-video,
.wp-block-code,
.wp-block-preformatted,
.wp-block-quote,
.wp-block-gallery,
.wp-block-columns,
.wp-block-group,
.wp-block-cover,
.wp-block-media-text,
ins.adsbygoogle,
.adsbygoogle,
.ad-block,
.ad-code {
    max-width: 100% !important;
}

/* Images */
img {
    height: auto !important;
    display: block;
}

/* Tables - Responsive */
table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}

/* Iframes & Embeds */
iframe,
embed,
object,
video {
    width: 100%;
    height: auto;
}

/* Code Blocks */
pre {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
    word-wrap: normal;
}

code {
    word-break: break-all;
}

/* Word Break for Long Text */
h1, h2, h3, h4, h5, h6,
p, li, td, th,
a, span, div {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: #16a34a;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #138a3e;
}

a:focus {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-bottom: 1em;
}

/* ============================================
   FORMS
   ============================================ */
input,
textarea,
select,
button {
    font-family: inherit;
    font-size: 16px; /* Prevents iOS zoom */
    max-width: 100%;
    box-sizing: border-box;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #16a34a;
}

button,
input[type="submit"],
input[type="button"] {
    cursor: pointer;
    background-color: #16a34a;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: #138a3e;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.screen-reader-text,
.skip-link {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link:focus {
    background-color: #16a34a;
    clip: auto !important;
    clip-path: none;
    color: #fff;
    display: block;
    font-size: 1rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    border-radius: 8px;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background-color: #16a34a;
    color: #fff;
}

::-moz-selection {
    background-color: #16a34a;
    color: #fff;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* ============================================
   WORDPRESS CORE CLASSES
   ============================================ */

/* Alignments */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #e5e7eb;
    max-width: 100%;
    padding: 5px 3px 10px;
    text-align: center;
    border-radius: 8px;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 100%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 0.85rem;
    line-height: 17px;
    margin: 0;
    padding: 5px 4px 0;
    color: #6b7280;
}

/* Text meant only for screen readers */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Sticky Posts */
.sticky {
    display: block;
}

/* Galleries */
.gallery {
    margin-bottom: 1.5em;
    display: grid;
    grid-gap: 10px;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    width: 100%;
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
    grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
    grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
    grid-template-columns: repeat(9, 1fr);
}

.gallery-caption {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    padding: 5px;
}

/* ============================================
   WORDPRESS BLOCK STYLES
   ============================================ */

/* Block Quote */
.wp-block-quote {
    border-left: 4px solid #16a34a;
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
}

.wp-block-quote cite {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5em;
}

/* Block Pullquote */
.wp-block-pullquote {
    border-top: 4px solid #16a34a;
    border-bottom: 4px solid #16a34a;
    margin: 2em 0;
    padding: 1.5em;
    text-align: center;
}

/* Block Table */
.wp-block-table {
    margin: 1.5em 0;
    overflow-x: auto;
}

.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75em;
}

.wp-block-table th {
    background: #f9fafb;
    font-weight: 600;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background: #f9fafb;
}

/* Block Code */
.wp-block-code {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

/* Block Preformatted */
.wp-block-preformatted {
    background: #f9fafb;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Block Separator */
.wp-block-separator {
    border: none;
    border-bottom: 2px solid #e5e7eb;
    margin: 2em 0;
}

.wp-block-separator.is-style-wide {
    border-bottom-width: 3px;
}

.wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
}

.wp-block-separator.is-style-dots::before {
    content: '···';
    color: #6b7280;
    font-size: 1.5rem;
    letter-spacing: 1em;
}

/* Block Button */
.wp-block-button__link {
    background-color: #16a34a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.wp-block-button__link:hover {
    background-color: #138a3e;
    color: #fff;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid #16a34a;
    color: #16a34a;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #16a34a;
    color: #fff;
}

/* Block Cover */
.wp-block-cover {
    min-height: 250px;
    margin: 1.5em 0;
    border-radius: 8px;
    overflow: hidden;
}

/* Block Columns */
.wp-block-columns {
    margin-bottom: 1.5em;
}

@media (max-width: 781px) {
    .wp-block-columns {
        flex-wrap: wrap;
    }
    
    .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* Block Image */
.wp-block-image {
    margin: 1.5em 0;
}

.wp-block-image img {
    border-radius: 8px;
}

.wp-block-image figcaption {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.5em;
}

/* Block Gallery */
.wp-block-gallery {
    margin: 1.5em 0;
}

.wp-block-gallery .blocks-gallery-image img,
.wp-block-gallery .blocks-gallery-item img {
    border-radius: 8px;
}

/* Block Embed */
.wp-block-embed {
    margin: 1.5em 0;
}

.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex Utilities */
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Margin */
.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }

/* Width */
.w-100 { width: 100%; }
.max-w-100 { max-width: 100%; }

/* Border Radius */
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-full { border-radius: 50%; }

/* Shadow */
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

/* ============================================
   RESPONSIVE TABLE WRAPPER
   ============================================ */
.table-scroll-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1em 0;
}

.table-scroll-wrapper table {
    margin: 0;
}

/* ============================================
   RESPONSIVE EMBED CONTAINER
   ============================================ */
.embed-container,
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1em 0;
}

.embed-container iframe,
.embed-container object,
.embed-container embed,
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    *,
    *::before,
    *::after {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]::after {
        content: " (" attr(title) ")";
    }
    
    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }
    
    pre {
        white-space: pre-wrap !important;
    }
    
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr,
    img {
        page-break-inside: avoid;
    }
    
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }
    
    h2,
    h3 {
        page-break-after: avoid;
    }
    
    .site-header,
    .site-footer,
    .site-sidebar,
    .mobile-nav,
    .mobile-menu-overlay,
    .back-to-top,
    .share-wrapper,
    .post-nav,
    .related-posts,
    .comments-area,
    .ad-block,
    .toc {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .content-wrapper {
        display: block;
    }
    
    .content-area {
        width: 100%;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    a {
        text-decoration: underline;
    }
    
    button,
    input[type="submit"],
    input[type="button"],
    .wp-block-button__link {
        border: 2px solid currentColor;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* 
     * Uncomment below if you want automatic dark mode
     * Currently disabled - can be enabled via customizer
     */
    /*
    body {
        background-color: #1a1a1a;
        color: #e5e5e5;
    }
    
    .site-header,
    .widget,
    .post-card,
    .single-post-wrapper {
        background-color: #2d2d2d;
    }
    
    a {
        color: #4ade80;
    }
    
    a:hover {
        color: #22c55e;
    }
    */
}

/* ============================================
   MOBILE RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (max-width: 640px) */
@media (max-width: 640px) {
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6,
    .gallery-columns-7,
    .gallery-columns-8,
    .gallery-columns-9 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin: 1em auto;
    }
}

/* ============================================
   END OF STYLE.CSS
   ============================================ */