/*
Theme Name:        designcoding
Theme URI:         https://www.designcoding.net
Description:       Designcoding is a lightweight, content-focused WordPress theme built around simplicity, speed, and readability. It uses a clean desktop layout with a responsive mobile version and does not require any plugins, page builders, external frameworks, or third-party services. The theme has been tested with LocalWP on a clean WordPress installation and works as intended. The theme includes several built-in content discovery features. Explore uses tags to help visitors discover related topics, while individual posts can automatically display up to five Related Posts based mainly on shared tags and categories. Code blocks include a lightweight Copy button, making the theme particularly useful for programming and technical articles. Search, category navigation, archives, pagination, featured images, and responsive embeds are all handled directly by the theme without plugins. Currently, the site allows 3dm, gh, ghx, py and zip upload. You will need to modify the functions.php to extend this list.
Author:            Tuğrul Yazar
Version:           1.3.0
*/

/* ===== GLOBAL ===== */

*{box-sizing:border-box}
body{margin:0;background:url(images/back.gif);color:#222;font:15px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
a{color:#000;text-decoration:none}
a:hover{color:red}
img{max-width:100%;height:auto;border:0}
iframe{height:337px}
pre{overflow:auto}
h1,h2,h3{font-family:inherit;font-weight:600;line-height:1.25;text-transform:none}
h1{margin:20px 0 0;font-size:1.6em}
h2{background:url(images/border_h.png) repeat-x bottom;font-size:1.3em;text-align:left}
h3{font-size:1.2em;text-align:center}
.center{text-align:center}

/* ===== MAIN LAYOUT ===== */

#page{width:min(900px,100%);margin:auto;background:#fff;overflow:hidden}
#header{padding:20px}
#content{float:left;width:620px;max-width:calc(100% - 260px)}
#content h1{text-align:center}
#sidebar{float:right;width:220px;padding-right:5px;text-align:justify;font-size:14px}
#footer{clear:both;min-height:40px;margin:20px;text-align:center}
.index-excerpt p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden}

/* ===== POSTS ===== */

.post{clear:both;overflow:hidden;margin-top:20px;text-align:justify}
.posthead{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:8px}
.posthead h2{margin:0;font-size:1.3em}
.postdate{color:#999;font-size:12px;font-weight:400;white-space:nowrap}
.postmetadata{text-align:center;font-size:13px;margin-bottom:10px}
.post .entry{font-size:14px;line-height:1.3}
.post .entry p:first-of-type{margin-top:0}
.entry:after{display:table;clear:both;content:""}
.entry a{font-weight:600}
.entry blockquote{margin:15px 0;padding:8px 16px;border-left:4px solid #999;background:#f8f8f8;font-size:0.95em;font-style:italic;color:#555}
.entry ol{list-style:decimal}
.entry ol ol{list-style:lower-alpha}
.entry ol ol ol{list-style:lower-roman}
.entry ul{margin:8px 0;padding-left:24px}
.entry li{margin:0;line-height:1.4}
.entry table{width:100%;border-collapse:collapse}
.entry th{padding:4px;background:#f4f4f4;color:#666}
.entry td{padding:4px;border-bottom:1px dotted #ccc}
.entry table a{font-weight:normal}

/* ===== IMAGES ===== */

img.wp-post-image,.alignleft{float:left;margin:0px}
.alignright{float:right;margin:0px}
.bordei img{border:1px solid #fff;border-radius:7px;margin-right:10px}
@media(min-width:761px){
.single-entry > .wp-block-image{float:left;width:auto;margin:10px 0;padding:0;clear:none}
.single-entry > .wp-block-image > figure{margin:0!important;padding:0}
.single-entry > .wp-block-image img{display:block;margin:0}
}

/* ===== PAGINATION ===== */

.pagination{margin:20px 0;text-align:center;line-height:1.5}
.pagination a,.pagination span{display:inline-block;margin:0 2px 10px;padding:3px 7px;border:1px solid #999}
.pagination .current{font-weight:600;background:#eee}

/* ===== CARD / CHIP SYSTEM ===== */

.dc-chips{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0 20px;padding:0;list-style:none}
.dc-chips a{display:inline-block;padding:5px 8px;border:1px solid #999;background:#f7f7f7;color:#222;font-size:13px;line-height:1.2}
.dc-chips a:hover{border-color:#222;background:#fff;color:#000}
#contents h2{margin:12px 0 2px;text-align:left}
#contents h3{margin:8px 0 2px;font-size:1.1em;text-align:left}

/* ===== SEARCH ===== */

.searchbox{clear:both;text-align:left;margin-top:5px}
.texta,.myButton{padding:5px;border:1px solid #999;font:11px Verdana,Arial,sans-serif}
#sidebar .searchbox .texta{width:150px}
.myButton{background:#ededed}
.myButton:hover{background:#900;color:#fff}

/* ===== SIDEBAR ===== */

#sidebar h2{background:url(images/border_h.png) repeat-x bottom;font-size:18px;margin-bottom:3px}
#sidebar ul{margin:0;padding:0}
#sidebar li{margin-top:3px;list-style:none}

/* ===== MOBILE MENU ===== */

#menubutton,#mobilemenu{display:none}

/* ===== WORDPRESS BLOCKS ===== */

.wp-block-embed iframe{width:600px}
.wp-block-embed__wrapper{width:600px}
.wp-block-embed_wrapper iframe{width:600px;height:337px}
.wp-block-file{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0;padding:6px 12px;border:1px solid #999;background:#f7f7f7}
.wp-block-file>a:first-child{pointer-events:none;color:inherit;text-decoration:none;cursor:default;font-size:14px;overflow-wrap:anywhere}
.wp-block-file .wp-block-file__button{display:inline-block;margin:0;padding:5px 10px;border:0;border-radius:0;background:#222;color:#fff;font-size:12px;font-weight:600;line-height:1.2;text-decoration:none;white-space:nowrap}

/* Code & Cite Styles */
.wp-block-code{position:relative;margin:0;padding:10px 10px 10px 5px;border:1px solid #999;border-radius:3px;background:#f7f7f7;tab-size:2;-moz-tab-size:2}
.wp-block-code code{display:block;padding:0;background:none;font-size:12px;line-height:1.4;counter-reset:ln}
.wp-block-code strong{font-weight:800;color:#000}
.copy-code-btn{position:absolute;top:6px;right:6px;padding:3px 8px;font-size:11px;color:#555;background:#e0e0e0;border:1px solid #ccc;border-radius:3px;cursor:pointer;opacity:.7;z-index:10}
.copy-code-btn:hover{opacity:1;background:#222;color:#fff}
.cl{display:block;width:100%;padding-left:2.7em;text-indent:-2.7em}
.cl::before{counter-increment:ln;content:counter(ln,decimal-leading-zero);display:inline-block;width:2em;margin-right:0.7em;text-align:right;color:#888;opacity:.6;user-select:none;text-indent:0}
.cite-post-box,
.cite-post-box pre,
.cite-post-box code,
.wp-block-code,
pre code {text-align: left !important;white-space: pre-wrap !important;word-break: break-all !important;overflow-wrap: anywhere !important}
.cite-post-box{position:relative;margin:0;padding:10px 50px 10px 10px;border:1px solid #999;border-radius:3px;background:#f7f7f7;font:12px -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;line-height:1.4;text-align:left;word-break:break-all}

/* ===== MOBILE ===== */

@media(max-width:760px){

/* Layout */
body{background:#fff;font-size:13px}
#content{float:none;width:auto;max-width:none;margin:0;padding:0 5px}
#sidebar{display:none}
#footer{margin:0;padding:5px 4px}

/* Header and menu */
#header{padding:10px 16px 3px}
#header>a{display:block;text-align:center}
#mobilehead{position:relative;text-align:left}
#mobilehead>a{display:block}
#mobilehead img{width:280px;height:auto}
#menubutton{display:block;position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0;padding:0;border:0;background:transparent;font-size:30px;font-weight:400;line-height:1;cursor:pointer}
#mobilemenu{display:none;margin:10px 0 15px;border-top:1px solid #999;border-bottom:1px solid #ddd;text-align:center}
#mobilemenu.open{display:block}
#mobilemenu a{display:block;padding:8px 0;border-bottom:1px solid #999}
#mobilemenu a:last-child{border-bottom:0}

/* Mobile search */
.mobile-search{width:100%;padding:5px 0;border-bottom:1px solid #eee}
.mobile-search form,.mobile-search label{display:block;width:100%;margin:0}
.mobile-search input[type="text"],.mobile-search input[type="search"]{display:block;width:100%;max-width:none;padding:7px 10px;border:1px solid #bbb;border-radius:3px;font-size:13px}
.mobile-search input[type="submit"],.mobile-search button{display:none}
#mobilemenu .mobile-search input[type="search"]::placeholder{text-align:center}

/* Posts */
.post{margin-top:15px}
.posthead{gap:8px;margin-bottom:0}
.posthead h2{flex:1;margin:0;font-size:1.25em;text-align:left}
.postdate{display:block;flex-shrink:0;font-size:10px;white-space:nowrap}
.postmetadata{margin-bottom:8px;font-size:11px}
.post .entry{font-size:13px;line-height:1.25}
.entry p{margin-top:2px}

/* Images */
img.wp-post-image{float:left}
.alignleft,.alignright{float:none;display:block;margin:0 auto 10px}
.patreonicon{width:16px;height:16px;margin-right:6px;vertical-align:-3px}

/* Embeds */
.wp-block-embed,.wp-block-embed__wrapper,.wp-block-embed_wrapper{width:100%!important;max-width:100%!important}
.wp-block-embed iframe,.wp-block-embed__wrapper iframe,.wp-block-embed_wrapper iframe{display:block;width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:16/9}

/* Files */
.wp-block-file{align-items:stretch;flex-direction:column;gap:8px;padding:10px}
.wp-block-file>a:first-child{text-align:center}
.wp-block-file .wp-block-file__button{display:block;width:auto;text-align:center}

/* Code */
.wp-block-code{padding:2px 2px 2px 0}
.wp-block-code code{font-size:9.5px;line-height:1.2}
.cl{padding-left:2.3em;text-indent:-2.3em}
.cl::before{width:1.7em;margin-right:0.6em}
.cite-post-box,
.cite-post-box pre,
.cite-post-box code,
.wp-block-code,
pre,
code {
    text-align: left !important;
    text-align-last: left !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}
}