/*
Theme Name: WallTag
Theme URI: https://example.com/
Author: DigitalTolk
Author URI: https://example.com/
Description: A modern dark WordPress theme for mobile wallpaper sites. Designed for tag-based browsing with gallery-first layouts and a lightweight lightbox.
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: walltag
Tags: dark, responsive, grid, minimal
*/
:root{
  --bg:#0b0d10;
  --surface:#11141a;
  --surface-2:#171b22;
  --text:#e8eef6;
  --muted:#a7b3c3;
  --border:#232a35;
  --accent:#6ea8fe;
  --accent-2:#7ee787;
  --shadow: 0 12px 30px rgba(0,0,0,.45);
  --radius:16px;
  --max:1200px;
}
*{box-sizing:border-box}
html{color-scheme:dark}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 800px at 20% -10%, rgba(110,168,254,.18), transparent 55%),
              radial-gradient(1000px 700px at 90% 0%, rgba(126,231,135,.10), transparent 50%),
              var(--bg);
  color:var(--text);
  line-height:1.5;
}
a{color:inherit; text-decoration:none}
a:hover{color:var(--accent)}
img{max-width:100%; height:auto; display:block}
hr{border:none; border-top:1px solid var(--border); margin:24px 0}

.site-header{
  position:sticky; top:0; z-index:50;
  background: rgba(11,13,16,.7);
  backdrop-filter: blur(14px);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:var(--max);
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  gap:14px;
}
.site-title{
  font-weight:700;
  letter-spacing:.2px;
  font-size:18px;
}
.site-title a{display:flex; align-items:center; gap:10px}
.site-icon{
  width:28px;
  height:28px;
  border-radius:10px;
  object-fit:cover;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.logo-mark{
  width:28px; height:28px;
  border-radius:10px;
  background: linear-gradient(135deg, rgba(110,168,254,.9), rgba(126,231,135,.7));
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
.nav-primary{margin-left:auto}
.nav-primary ul{list-style:none; display:flex; gap:14px; margin:0; padding:0; flex-wrap:wrap}
.nav-primary a{
  padding:8px 10px;
  border-radius:999px;
  color:var(--muted);
}
.nav-primary a:hover{
  color:var(--text);
  background: rgba(255,255,255,.06);
}

.nav-toggle{
  display:none;
  margin-left:auto;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.nav-toggle svg{width:18px; height:18px; fill:currentColor}

@media(max-width:760px){
  .header-inner{position:relative; flex-wrap:wrap}
  .nav-toggle{display:inline-flex; margin-left:auto}

  /* Mobile menu expands header instead of floating panel */
  .nav-primary{
    position:static;
    width:100%;
    margin-left:0;
    display:none;
    padding:0;
    border:0;
    background:transparent;
    backdrop-filter:none;
    border-radius:0;
    box-shadow:none;
  }
  body.nav-open .nav-primary{display:block}

  .nav-primary ul{list-style:none; display:flex; flex-direction:column; align-items:center; gap:0; margin:0; padding:8px 0 0; width:100%; border-top:1px solid var(--border)}
  .nav-primary li{padding:0; margin:0; width:100%; text-align:center}
  .nav-primary a{display:block; width:100%; text-align:center; padding:12px 0; border-radius:0; border-bottom:1px solid rgba(255,255,255,.06)}
  .nav-primary li:last-child a{border-bottom:0}
}

.site{
  max-width:var(--max);
  margin:0 auto;
  padding:22px 18px 70px;
  display:grid;
  grid-template-columns: 1fr;
  gap:24px;
}
@media(min-width:980px){
  .site{grid-template-columns: 1fr 320px; gap:28px}
}
.content{min-width:0}
.sidebar{
  position:relative;
  border:1px solid var(--border);
  background: rgba(17,20,26,.55);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
  height:fit-content;
}
.sidebar .widget{margin:0 0 18px}
.sidebar .widget:last-child{margin-bottom:0}
.widget-title{font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.12em; margin:0 0 12px}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
@media(min-width:640px){ .grid{grid-template-columns: repeat(3, minmax(0, 1fr)); gap:12px} }
@media(min-width:980px){ .grid{grid-template-columns: repeat(3, minmax(0, 1fr)); gap:14px} }

.wall-card{
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
  position:relative;
}
.wall-card img{
  width:100%;
  aspect-ratio: 9 / 16;
  object-fit:cover;
  background: var(--surface-2);
  transform: scale(1.01);
  transition: transform .25s ease;
}
.wall-card:hover img{transform: scale(1.06)}
.wall-meta{
  position:absolute;
  left:10px; right:10px; bottom:10px;
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.wall-tags{
  display:flex; gap:6px; flex-wrap:wrap;
}
.tag-pill{
  font-size:11px;
  padding:5px 9px;
  border-radius:999px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  max-width:100%;
}
.tag-pill:hover{background: rgba(110,168,254,.20); border-color: rgba(110,168,254,.35)}
.wall-count{
  font-size:11px;
  padding:5px 9px;
  border-radius:999px;
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.85);
}

.post-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.post-title{font-size:22px; margin:0}
.post-tax{display:flex; flex-wrap:wrap; gap:8px}
.post-tax a{
  font-size:12px;
  color:var(--muted);
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background: rgba(255,255,255,.03);
}
.post-tax a:hover{border-color: rgba(110,168,254,.5); color:var(--text)}

.gallery-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
@media(min-width:640px){ .gallery-grid{grid-template-columns: repeat(3, minmax(0, 1fr))} }
@media(min-width:980px){ .gallery-grid{grid-template-columns: repeat(4, minmax(0, 1fr))} }
.gallery-item{
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}
.gallery-item img{
  width:100%;
  aspect-ratio: 9/16;
  object-fit:cover;
}

.single-image img{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"]{
  width:100%;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:12px 12px;
}
.comment-form input[type="submit"]{
  background: linear-gradient(135deg, rgba(110,168,254,.95), rgba(126,231,135,.75));
  border:0;
  color:#0b0d10;
  border-radius:12px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
}
.comment-list{list-style:none; margin:0; padding:0}
.comment-list li{list-style:none; margin:0; padding:0}
.comment-list .children{list-style:none; margin:0; padding:0}
.comment-body{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius:16px;
  padding:12px;
  margin:0 0 12px;
}
.comment-meta{margin:0 0 8px}
.comment-meta-row{display:flex; align-items:center; gap:10px}
.comment-avatar img{width:32px; height:32px; border-radius:999px}
.comment-author{color:var(--text); font-weight:600}
.comment-author a{color:inherit}
.comment-time{margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap}
.comment-awaiting-moderation{margin:8px 0 0; color:var(--muted); font-size:12px}
.comment-content{margin:0}
.comment-content p{margin:0 0 8px}
.comment-actions{display:flex; gap:12px; font-size:12px}
.comment-actions a{color:var(--muted)}
.comment-actions a:hover{color:var(--text)}

.site-footer{
  border-top:1px solid var(--border);
  margin-top:30px;
  padding:16px 18px;
  color:var(--muted);
  font-size:12px;
}
.footer-inner{max-width:var(--max); margin:0 auto; display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between}
.nav-footer ul{list-style:none; display:flex; gap:12px; margin:0; padding:0; flex-wrap:wrap}
.nav-footer a{color:var(--muted); padding:0; border-radius:0}
.nav-footer a:hover{color:var(--text); text-decoration:underline}

/* Thumbnail overlays */
.thumb-wrap{position:relative}
.post-thumb-link{display:block; position:relative}
.date-pill{
  position:absolute;
  top:12px;
  left:12px;
  font-size:12px;
  background: rgba(0,0,0,.72);
  color:#fff;
  padding:4px 8px;
  border-radius:999px;
  line-height:1;
}
.img-count{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  gap:6px;
  align-items:center;
  background: rgba(0,0,0,.75);
  color:#fff;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  line-height:1;
}
.img-count svg{fill:none; stroke:currentColor; stroke-width:1.5; width:14px; height:14px;}

/* Single post date */
.post-date{margin-top:6px; color:var(--muted); font-size:13px}

/* Pagination */
.pagination{margin-top:18px}
.pagination .nav-links{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:center}
.pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--muted);
  text-decoration:none;
}
.pagination .page-numbers:hover{color:var(--text); background: rgba(255,255,255,.06)}
.pagination .page-numbers.current{color:var(--text); background: rgba(255,255,255,.08)}

.lightbox{
  position:fixed; inset:0; z-index:1000;
  background: rgba(0,0,0,.92);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.lightbox.is-open{display:flex}
.lightbox img{max-width:min(100%, 520px); max-height:88vh; border-radius:18px; box-shadow: var(--shadow)}
.lightbox .lb-close{
  position:fixed; top:16px; right:16px;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  display:grid; place-items:center;
  cursor:pointer;
}
.lightbox .lb-close svg{width:20px; height:20px; fill:#fff}




/* WP admin bar offset for sticky header */
body.admin-bar .site-header{ top:32px; }

@media (max-width:782px){
  body.admin-bar #wpadminbar{ position:fixed !important; top:0; left:0; right:0; }
  body.admin-bar .site-header{ top:46px; }
}
@media (max-width: 768px){
  .site-nav a{display:block; width:100%; text-align:center;}
  .site-nav li{width:100%;}
}


/* Comments: remove all list bullets/indents */
#comments ul, #comments ol, .comment-list, .comment-list ul, .comment-list ol{
  list-style:none;
  margin:0;
  padding:0;
}
.comment-list li{
  list-style:none;
  margin:0;
  padding:0;
}
.wp-block-latest-comments, .wp-block-latest-comments li{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
}



/* Mobile admin bar fix: only offset when admin bar exists */
@media (max-width: 782px) {
  body:not(.admin-bar) .site-header {
    top: 0 !important;
  }
  body.admin-bar .site-header {
    top: 46px;
  }
}


body:not(.admin-bar) #wpadminbar { display:none; }
  body:not(.admin-bar) .site-header { top: 0 !important; }

  body.admin-bar #wpadminbar { position: fixed; top: 0; left: 0; right: 0; width: 100%; }
  body.admin-bar body.admin-bar .site-header { top: 46px !important; }
}


@media (max-width:782px){ body:not(.admin-bar) .site-header{ top:0 !important; } }

/* ------------------------------------------------------------
   Admin bar + sticky header (editors/admins)
------------------------------------------------------------ */
body.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
  body.admin-bar #wpadminbar {
    position: fixed !important;
    top: 0; left: 0; right: 0;
    width: 100%;
  }
  body.admin-bar .site-header { top: 46px !important; }
  body:not(.admin-bar) .site-header { top: 0 !important; }
}

/* Mobile menu layout */
@media (max-width: 782px) {
  .site-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .primary-navigation { width: 100%; }
  .primary-navigation ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin: 0;
  }
  .primary-navigation li { list-style: none; width: 100%; margin: 0; }
  .primary-navigation a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
  }
}

/* Comments: remove bullets/indent everywhere */
#comments ul, #comments ol,
#comments .comment-list, #comments .comment-list ul, #comments .comment-list ol,
.wp-block-latest-comments {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

#comments li,
.wp-block-latest-comments li {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

/* Thumb image count pill svg sizing */
.img-count svg { width: 14px; height: 14px; display: block; stroke: currentColor; }
