/*
Theme Name: DevMajstore
Theme URI: https://devmajstore.local/
Author: DevMajstore
Description: Minimalna WordPress tema u stilu portala webmajstori.net — grid članaka, svijetla pozadina i čiste kartice.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: devmajstore
*/

:root {
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #0d1b2a;
  --muted: #6b7a89;
  --brand: #1d70b8;
  --border: #e6edf2;
  --shadow: 0 10px 24px rgba(13, 27, 42, .07);
  --shadow-hover: 0 16px 34px rgba(13, 27, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.admin-bar .site-header {
  top: 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--brand);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* HEADER */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 22px;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 0;
}

.custom-logo-link {
  display: flex;
  align-items: center;
  max-width: 100%;
}

.site-logo img,
.custom-logo {
  width: var(--dev-logo-width, 220px) !important;
  max-width: var(--dev-logo-width, 220px) !important;
  height: auto !important;
  max-height: var(--dev-logo-height, 60px) !important;
  object-fit: contain;
  display: block;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #14466f;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 24px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.logo-mark span {
  background: var(--brand);
  clip-path: polygon(0 0, 100% 0, 75% 100%, 25% 100%);
}

.logo small {
  color: var(--brand);
  font-size: .75em;
}

/* NAV */

.main-nav {
  flex-shrink: 0;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  font-size: 15px;
  color: #334155;
  font-weight: 700;
  transition: color .18s ease;
}

.main-nav a:hover {
  color: var(--brand);
}

/* MAIN */

.site-main {
  padding: 54px 0 70px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

/* POSTS GRID */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
  align-items: stretch;
}

.post-card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 3px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #dce7ef;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.post-card:hover .post-thumb img {
  transform: scale(1.04);
}

.post-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cat {
  display: inline-block;
  width: fit-content;
  color: var(--brand);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

h2.post-title {
  font-size: 23px;
  line-height: 1.16;
  letter-spacing: -.35px;
  margin: 0 0 10px;
  font-weight: 800;
}

.post-title a {
  color: #07111f;
}

.post-title a:hover {
  color: var(--brand);
}

.meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: #405161;
  margin: 0;
}

/* PAGINATION */

.pagination {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination .page-numbers {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: #425466;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.pagination .current,
.pagination .page-numbers:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.no-posts {
  text-align: center;
  font-size: 18px;
  color: var(--muted);
}

/* FOOTER */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 22px;
  color: #667789;
  font-size: 13px;
  background: var(--bg);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: #526579;
}

.footer-links a:hover {
  color: var(--brand);
}

/* SINGLE / PAGE BASIC */

.entry-content {
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 34px;
  border-radius: 3px;
}

.entry-content p {
  font-size: 16px;
  line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
  line-height: 1.25;
}

/* TABLET */

@media (max-width: 1024px) {
  .header-inner {
    max-width: 900px;
  }

  .container {
    max-width: 900px;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 24px;
  }

  h2.post-title {
    font-size: 22px;
  }
}

/* MOBILE HEADER */

@media (max-width: 760px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    min-height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 22px 18px;
    text-align: center;
  }

  .site-branding {
    justify-content: center;
    width: 100%;
  }

  .site-logo img,
  .custom-logo {
    max-width: min(var(--dev-logo-width, 220px), 85vw) !important;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .main-nav a {
    font-size: 14px;
  }
}

/* MOBILE CONTENT */

@media (max-width: 620px) {
  .site-main {
    padding: 34px 0 52px;
  }

  .container {
    padding: 0 14px;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .post-body {
    padding: 19px 18px 22px;
  }

  h2.post-title {
    font-size: 21px;
  }

  .excerpt {
    font-size: 14px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    gap: 14px 18px;
  }

  .entry-content {
    padding: 24px 20px;
  }
}

/* SMALL MOBILE */

@media (max-width: 420px) {
  .logo {
    font-size: 21px;
  }

  .main-nav ul {
    gap: 10px 14px;
  }

  .main-nav a {
    font-size: 13px;
  }

  h2.post-title {
    font-size: 20px;
  }

  .site-logo img,
  .custom-logo {
    max-width: 82vw !important;
  }
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 38px;
}

.post-card {
  background: #fff;
  box-shadow: none;
  border-radius: 0;
  overflow: hidden;
}

.post-card:hover {
  transform: none;
  box-shadow: none;
}

.post-thumb {
  aspect-ratio: 16 / 10;
  height: 240px;
  background: #dce7ef;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  padding: 28px 30px 32px;
}

.cat {
  font-size: 11px;
  font-weight: 800;
  color: #005eb8;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h2.post-title {
  font-size: 26px;
  line-height: 1.45;
  margin: 0 0 16px;
  font-weight: 800;
}

.meta {
  font-size: 12px;
  color: #0d1b2a;
  margin-bottom: 18px;
}

.excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: #0d1b2a;
  margin: 0;
}

@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-thumb {
    height: 220px;
  }
}

@media (max-width: 620px) {
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .post-thumb {
    height: 210px;
  }

  .post-body {
    padding: 24px 22px 28px;
  }

  h2.post-title {
    font-size: 23px;
  }

  .excerpt {
    font-size: 15px;
  }
}

.single-container {
  max-width: 920px;
}

.single-post {
  background: #fff;
  padding: 46px;
}

.single-cat {
  display: inline-block;
  color: var(--brand);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.single-title {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -1px;
}

.single-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.single-thumb {
  margin-bottom: 36px;
}

.single-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.single-content {
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.single-content p {
  font-size: 18px;
  line-height: 1.85;
  margin-bottom: 24px;
}

.single-content h2 {
  font-size: 30px;
  margin-top: 36px;
}

.post-navigation {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post-navigation a {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 620px) {
  .single-post {
    padding: 26px 20px;
  }

  .single-title {
    font-size: 32px;
  }

  .single-content p {
    font-size: 16px;
  }

  .post-navigation {
    flex-direction: column;
  }
}