/*
Theme Name: GM24 Theme
Description: Ultra-lightweight custom WordPress theme for GetMoney24.ru (0 jQuery, <6KB CSS).
Author: GetMoney24
Version: 1.0.0
Text Domain: gm24
*/
*,*::before,*::after{box-sizing:border-box}
html{line-height:1.6;-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:16px;color:#0f172a;background:#f8fafc}
a{color:#1d4ed8;text-decoration:none}
a:hover{text-decoration:underline}
img,iframe,video{max-width:100%;height:auto}
img{border-radius:6px}
h1,h2,h3,h4{color:#0f172a;line-height:1.28;margin:1.4em 0 .6em;font-weight:700}
h1{font-size:clamp(1.6rem,3vw,2.15rem);margin-top:0}
h2{font-size:clamp(1.28rem,2.2vw,1.55rem)}
h3{font-size:1.15rem}
p,ul,ol{margin:0 0 1em}
ul,ol{padding-left:1.35em}
li{margin:.3em 0}
code{background:#f1f5f9;padding:2px 6px;border-radius:4px;font-size:.9em;color:#0f172a}
blockquote{margin:1.2em 0;padding:12px 18px;border-left:4px solid #2563eb;background:#f8fafc;color:#334155;border-radius:0 6px 6px 0}
table{width:100%;border-collapse:collapse;margin:1.2em 0;font-size:.95rem;display:block;overflow-x:auto}
th,td{border:1px solid #e2e8f0;padding:10px 12px;text-align:left}
th{background:#f1f5f9;font-weight:600}

/* Layout */
.gm-wrap{max-width:1100px;margin:0 auto;padding:0 18px}
.gm-main{padding:24px 0 48px}
.gm-article,.gm-page-box{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:clamp(18px,3vw,34px);box-shadow:0 1px 4px rgba(15,23,42,.03)}
.gm-narrow{max-width:860px;margin:0 auto}

/* Header & Nav */
.gm-header{background:#fff;border-bottom:1px solid #e2e8f0;position:sticky;top:0;z-index:50}
.gm-header-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:8px 0;flex-wrap:wrap}
.gm-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:1.15rem;color:#0f172a;text-decoration:none!important;flex-shrink:0}
.gm-brand img{max-height:38px;width:auto;border-radius:0}
.gm-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.gm-nav li{margin:0}
.gm-nav a{color:#334155;font-size:.93rem;font-weight:600;padding:6px 4px;display:inline-block}
.gm-nav a:hover,.gm-nav .current-menu-item>a{color:#1d4ed8;text-decoration:none}
.gm-mob-menu{display:none}
.gm-mob-menu summary{list-style:none;cursor:pointer;padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;font-weight:600;font-size:.9rem;color:#0f172a;user-select:none}
.gm-mob-menu summary::-webkit-details-marker{display:none}
.gm-mob-menu[open] .gm-mob-list{position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 18px 18px;box-shadow:0 8px 20px rgba(15,23,42,.08)}
.gm-mob-list ul{list-style:none;margin:0;padding:0}
.gm-mob-list li{margin:0;border-bottom:1px solid #f1f5f9}
.gm-mob-list a{display:block;padding:10px 4px;color:#0f172a;font-weight:600}
@media(max-width:920px){.gm-nav{display:none}.gm-mob-menu{display:block}}

/* Breadcrumbs & Meta */
.gm-crumbs{font-size:.86rem;color:#64748b;margin:0 0 14px;line-height:1.5}
.gm-crumbs a{color:#475569}
.gm-crumbs .separator,.gm-crumbs .gm-sep{margin:0 6px;color:#94a3b8}
.gm-meta{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;font-size:.86rem;color:#64748b;margin:0 0 20px;padding-bottom:14px;border-bottom:1px solid #f1f5f9}
.gm-cat-pill{background:#eff6ff;color:#1d4ed8;font-weight:600;padding:3px 10px;border-radius:999px;font-size:.8rem}
.gm-thumb{margin:0 0 20px}

/* Archive Grid */
.gm-archive-head{margin:0 0 22px}
.gm-archive-desc{color:#475569;margin-top:8px}
.gm-posts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.gm-post-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:18px 20px;display:flex;flex-direction:column;justify-content:space-between;transition:border-color .15s}
.gm-post-card:hover{border-color:#93c5fd}
.gm-post-card h2{font-size:1.08rem;margin:0 0 8px;line-height:1.35}
.gm-post-card h2 a{color:#0f172a}
.gm-post-card h2 a:hover{color:#1d4ed8;text-decoration:none}
.gm-post-card p{font-size:.92rem;color:#475569;margin:0 0 12px}
.gm-post-card-foot{font-size:.82rem;color:#64748b;display:flex;justify-content:space-between;align-items:center}
.gm-pagination{margin:28px 0 0;display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.gm-pagination .page-numbers{padding:8px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#0f172a;font-weight:600}
.gm-pagination .current{background:#1d4ed8;border-color:#1d4ed8;color:#fff}

/* Legacy [raw] offers compatibility (/srochno/ & #1369) */
.offers_item{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;align-items:center;background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:14px 16px;margin:12px 0}
.offers_item img{max-height:46px;width:auto}
.offers_item span{display:block;font-size:.92rem;color:#334155}
.offers_item a.btn,.offers_item .btn,.offers_item button{display:inline-block;background:#16a34a;color:#fff!important;padding:10px 16px;border-radius:8px;font-weight:600;text-align:center;text-decoration:none!important;border:0}

/* Comments */
.gm-comments{margin-top:28px;padding-top:20px;border-top:1px solid #e2e8f0}
.comment-list{list-style:none;padding:0}
.comment-body{padding:12px 0;border-bottom:1px solid #f1f5f9}
.comment-form textarea,.comment-form input[type="text"],.comment-form input[type="email"]{width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;font:inherit}
.comment-form input[type="submit"]{background:#1d4ed8;color:#fff;border:0;padding:10px 20px;border-radius:8px;font-weight:600;cursor:pointer}

/* Footer */
.gm-footer{background:#0f172a;color:#cbd5e1;padding:34px 0 26px;font-size:.9rem}
.gm-footer a{color:#e2e8f0}
.gm-footer a:hover{color:#fff}
.gm-footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px;margin-bottom:22px}
.gm-footer h3{color:#fff;font-size:1rem;margin:0 0 10px}
.gm-footer ul{list-style:none;padding:0;margin:0}
.gm-footer li{margin:6px 0}
.gm-footer-bottom{border-top:1px solid #1e293b;padding-top:16px;font-size:.82rem;color:#94a3b8;line-height:1.5}

/* --- Исправление кликабельности старых .offers_item на /srochno/ --- */
.offers_item {
    cursor: pointer;
    transition: all 0.2s ease;
}
.offers_item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}
.offers_item .btn, 
.offers_item a.btn, 
.offers_item button, 
.offers_item a[href*="/go/"] {
    display: inline-block !important;
    background: #16a34a !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: opacity 0.15s ease !important;
}
.offers_item .btn:hover, 
.offers_item a.btn:hover, 
.offers_item a[href*="/go/"]:hover {
    opacity: 0.9;
}
