/*
Theme Name: The Code Loft
Theme URI: https://example.com
Author: Angelina
Author URI: https://example.com
Description: Максимально простая тема для IT-блога на русском языке: шрифт Times New Roman, без слайдера, без переключателей, без тёмной темы — только меню и поиск.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: codeloft
*/

/* ==========================================================================
   Variables
   ========================================================================== */
:root{
	--c-bg:#ffffff;
	--c-ink:#1a1a1a;
	--c-ink-soft:#555555;
	--c-line:#dddddd;
	--c-link:#1155cc;
	--maxw:1180px;
	--font:'Times New Roman', Times, Georgia, serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box;}
body{
	margin:0;
	font-family:var(--font);
	color:var(--c-ink);
	background:var(--c-bg);
	line-height:1.6;
	font-size:18px;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--c-link);text-decoration:none;}
a:hover{text-decoration:underline;}
ul{list-style:none;margin:0;padding:0;}
button{font-family:inherit;cursor:pointer;}
input,textarea{font-family:inherit;font-size:17px;}
h1,h2,h3,h4{font-family:var(--font);font-weight:700;line-height:1.25;margin:0 0 .5em;color:var(--c-ink);}
p{margin:0 0 1em;}
.container{max-width:var(--maxw);margin:0 auto;padding:0 24px;}
.screen-reader-text{position:absolute;left:-9999px;}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{border-bottom:1px solid var(--c-line);}
.header-inner{display:flex;align-items:center;gap:32px;padding:20px 24px;max-width:var(--maxw);margin:0 auto;}
.brand{font-family:var(--font);font-size:24px;font-weight:700;color:var(--c-ink);flex:0 0 auto;}
.brand span{color:var(--c-ink-soft);font-weight:400;}

.primary-nav{flex:1;}
.primary-nav ul{display:flex;gap:28px;flex-wrap:wrap;}
.primary-nav a{font-size:17px;color:var(--c-ink);}
.primary-nav a:hover,.primary-nav .current-menu-item a{color:var(--c-link);text-decoration:underline;}

.menu-toggle{display:none;background:none;border:none;font-size:22px;color:var(--c-ink);}
.search-toggle{background:none;border:none;color:var(--c-ink);display:flex;padding:4px;flex:0 0 auto;}
.search-toggle svg{width:20px;height:20px;}

.header-search{max-width:var(--maxw);margin:0 auto;padding:0 24px;max-height:0;overflow:hidden;transition:max-height .2s ease;}
.header-search.is-open{max-height:70px;padding-bottom:16px;}
.header-search form{display:flex;gap:8px;}
.header-search input[type="search"]{flex:1;padding:9px 12px;border:1px solid var(--c-line);font-family:var(--font);font-size:16px;}
.header-search button{padding:9px 18px;border:1px solid var(--c-ink);background:var(--c-ink);color:#fff;font-family:var(--font);font-size:16px;}

@media (max-width:820px){
	.menu-toggle{display:block;order:3;}
	.primary-nav{display:none;order:5;flex:1 0 100%;}
	.primary-nav.is-open{display:block;}
	.primary-nav ul{flex-direction:column;gap:10px;padding:14px 0;}
	.header-inner{flex-wrap:wrap;}
}

/* ==========================================================================
   Layout: content + sidebar
   ========================================================================== */
.page-wrap{padding:34px 0 60px;}
.layout-grid{display:grid;grid-template-columns:1fr 300px;gap:44px;align-items:start;}
@media (max-width:860px){.layout-grid{grid-template-columns:1fr;}}

/* ==========================================================================
   Post list (home / blog / category)
   ========================================================================== */
.post-list-item{padding-bottom:34px;margin-bottom:34px;border-bottom:1px solid var(--c-line);}
.post-list-item:last-child{border-bottom:none;}
.post-list-item img{margin-bottom:18px;}
.post-list-item h2{font-size:26px;margin-bottom:10px;}
.post-list-item h2 a{color:var(--c-ink);}
.post-list-item h2 a:hover{color:var(--c-link);}
.post-meta{font-size:14px;color:var(--c-ink-soft);margin-bottom:10px;}
.post-list-item p{color:var(--c-ink-soft);font-size:17px;}
.read-more{font-size:16px;}

.pagination{display:flex;gap:10px;padding:10px 0 40px;}
.pagination a,.pagination span{padding:7px 12px;border:1px solid var(--c-line);font-size:15px;}
.pagination .current{background:var(--c-ink);color:#fff;border-color:var(--c-ink);}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar h3{font-size:19px;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid var(--c-line);}
.sidebar-block{margin-bottom:34px;}
.sidebar-post-item{margin-bottom:14px;font-size:16px;}
.sidebar-post-item a{color:var(--c-ink);}
.sidebar-post-item a:hover{color:var(--c-link);}
.sidebar-empty{font-size:15px;color:var(--c-ink-soft);}

/* ==========================================================================
   Static pages
   ========================================================================== */
.page-hero h1{font-size:32px;margin-bottom:22px;}
.page-content p{color:var(--c-ink-soft);font-size:17px;}

.contact-form{max-width:560px;margin-top:6px;}
.form-row{margin-bottom:18px;}
.form-row label{display:block;font-weight:700;font-size:15px;margin-bottom:6px;}
.form-row input,.form-row textarea{width:100%;border:1px solid var(--c-line);padding:10px 12px;font-family:var(--font);font-size:16px;color:var(--c-ink);}
.form-row textarea{min-height:130px;resize:vertical;}
.form-row input:focus,.form-row textarea:focus{outline:1px solid var(--c-ink);}
.btn-submit{background:var(--c-ink);color:#fff;border:none;padding:11px 26px;font-family:var(--font);font-size:16px;}
.btn-submit:hover{background:#000;}
.form-notice{padding:10px 14px;margin-bottom:18px;font-size:15px;border:1px solid var(--c-line);}
.form-notice.success{background:#eef7ee;}
.form-notice.error{background:#fbeeee;}

/* ==========================================================================
   Single post
   ========================================================================== */
.single-post-wrap h1{font-size:30px;}
.single-post-wrap .post-thumb{margin-bottom:22px;}
.entry-content{font-size:18px;}
.entry-content p{margin-bottom:1.2em;}
.entry-content img{margin:1.3em 0;}
.entry-content h2{font-size:24px;}
.entry-content h3{font-size:20px;}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs{padding:16px 0 0;font-size:14px;color:var(--c-ink-soft);}
.breadcrumbs a{color:var(--c-link);}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{border-top:1px solid var(--c-line);margin-top:24px;}
.footer-inner{padding:26px 0;display:flex;flex-wrap:wrap;justify-content:space-between;gap:14px;font-size:15px;color:var(--c-ink-soft);}
.footer-nav ul{display:flex;gap:18px;flex-wrap:wrap;}
.footer-nav a{color:var(--c-ink-soft);}
.footer-nav a:hover{color:var(--c-link);}

.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);}
