/*
Theme Name: SMS Čestitke
Theme URI: https://smscestitke.com/
Author: SMS Čestitke
Description: Lagana i pristupačna tema za zbirku SMS čestitki.
Version: 1.0.8
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sms-cestitke
*/

:root {
  --sc-ink: #24324a;
  --sc-muted: #64748b;
  --sc-teal: #087f8c;
  --sc-teal-dark: #075e69;
  --sc-coral: #ef6c5b;
  --sc-cream: #fff9f4;
  --sc-surface: #ffffff;
  --sc-border: #e5edf0;
  --sc-shadow: 0 12px 32px rgba(36, 50, 74, .08);
  --sc-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sc-ink);
  background: #f7fbfc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
a { color: var(--sc-teal-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover, a:focus { color: var(--sc-coral); }
img { max-width: 100%; height: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 0; left: 12px; top: 12px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #fff; color: var(--sc-ink); box-shadow: var(--sc-shadow); }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }

.site-header { background: var(--sc-surface); border-bottom: 1px solid var(--sc-border); position: relative; z-index: 10; }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--sc-ink); text-decoration: none; font-weight: 800; font-size: clamp(1.2rem, 2vw, 1.55rem); letter-spacing: -.02em; }
.brand img { max-height: 64px; width: auto; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--sc-teal), var(--sc-coral)); font-size: 1.25rem; }
.header-tagline { color: var(--sc-muted); font-size: .92rem; margin: 0; }
.header-search { display: flex; align-items: center; gap: 8px; }
.header-search input { width: min(230px, 35vw); border: 1px solid var(--sc-border); border-radius: 999px; padding: 10px 15px; font: inherit; }
.button, button, input[type="submit"] { border: 0; border-radius: 999px; padding: 10px 17px; background: var(--sc-teal); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.button:hover, button:hover, input[type="submit"]:hover { background: var(--sc-teal-dark); color: #fff; }
.main-nav { background: var(--sc-ink); }
.main-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.menu-toggle { display: none; background: transparent; padding: 8px 0; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px 0; background: #fff; }
.primary-menu, .primary-menu ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-menu > li { position: relative; }
.primary-menu > li > ul { display: none; position: absolute; top: 100%; left: 0; z-index: 30; min-width: 230px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; border: 1px solid var(--sc-border); border-radius: 0 0 12px 12px; background: #fff; box-shadow: var(--sc-shadow); }
.primary-menu > li:hover > ul, .primary-menu > li:focus-within > ul { display: flex; }
.primary-menu > li.menu-item-has-children > a::after { content: '⌄'; margin-left: 7px; font-size: .8em; }
.primary-menu > li > ul a { color: var(--sc-ink); padding: 9px 15px; white-space: nowrap; }
.primary-menu > li > ul a:hover, .primary-menu > li > ul a:focus { color: var(--sc-teal-dark); background: #eef9fa; }
.primary-menu a { display: block; padding: 13px 14px; color: #fff; text-decoration: none; font-weight: 650; font-size: .95rem; }
.primary-menu a:hover, .primary-menu a:focus { color: #fff; background: rgba(255,255,255,.12); }

.hero { background: linear-gradient(115deg, #e8f8f8 0%, var(--sc-cream) 100%); border-bottom: 1px solid var(--sc-border); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 36px; padding: 64px 0; }
.eyebrow { margin: 0 0 10px; color: var(--sc-coral); text-transform: uppercase; letter-spacing: .11em; font-size: .78rem; font-weight: 800; }
.hero h1 { margin: 0 0 14px; color: var(--sc-ink); font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.08; letter-spacing: -.045em; }
.hero p { max-width: 58ch; margin: 0 0 22px; color: var(--sc-muted); font-size: 1.08rem; }
.hero-card { border: 1px solid rgba(8,127,140,.16); border-radius: 28px; padding: 28px; background: rgba(255,255,255,.82); box-shadow: var(--sc-shadow); }
.hero-card p { margin: 0; color: var(--sc-teal-dark); font-size: 1.15rem; font-weight: 700; }
.hero-card .spark { font-size: 2.8rem; line-height: 1; margin-bottom: 12px; }

.content-area { flex: 1; padding: 48px 0 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--sc-muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--sc-border); border-radius: var(--sc-radius); background: var(--sc-surface); box-shadow: var(--sc-shadow); }
.post-card .card-image { aspect-ratio: 16 / 9; background: #e6f3f4; overflow: hidden; }
.post-card .card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.post-card .post-meta { color: var(--sc-muted); font-size: .82rem; }
.post-card h3 { margin: 8px 0 10px; font-size: 1.2rem; line-height: 1.25; }
.post-card h3 a { color: var(--sc-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--sc-teal-dark); }
.post-card .excerpt { margin: 0 0 15px; color: var(--sc-muted); font-size: .95rem; }
.read-more { margin-top: auto; font-weight: 750; }
.empty-state { padding: 28px; border: 1px dashed var(--sc-border); border-radius: var(--sc-radius); background: #fff; }

.category-strip { margin: 0 0 46px; }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.category-grid a { display: block; padding: 16px; border: 1px solid var(--sc-border); border-radius: 14px; background: #fff; color: var(--sc-ink); text-decoration: none; font-weight: 700; box-shadow: 0 5px 16px rgba(36,50,74,.04); }
.category-grid a:hover { border-color: var(--sc-teal); transform: translateY(-1px); }
.blog-section { margin-top: 52px; padding-top: 42px; border-top: 1px solid var(--sc-border); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 34px; }
.content-layout > * { min-width: 0; }
.entry, .sidebar-card { border: 1px solid var(--sc-border); border-radius: var(--sc-radius); background: #fff; box-shadow: var(--sc-shadow); }
.entry { padding: clamp(22px, 4vw, 44px); }
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.04em; }
.entry-meta { color: var(--sc-muted); font-size: .9rem; }
.entry-content { font-size: 1.08rem; }
.entry-content img, .entry img { max-width: 100%; height: auto; }
.entry-content figure, .entry figure, .entry-content .wp-caption { max-width: 100%; }
.entry-content figure img, .entry figure img { max-width: 100%; height: auto; }
.entry-content h2, .entry-content h3 { margin-top: 1.7em; line-height: 1.25; }
.entry-content blockquote { border-left: 4px solid var(--sc-coral); margin: 1.5em 0; padding: 12px 20px; background: var(--sc-cream); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--sc-border); padding: 9px 11px; text-align: left; }
.sidebar-card { padding: 20px; margin-bottom: 20px; }
.sidebar-card h2, .sidebar-card h3 { margin-top: 0; font-size: 1.18rem; }
.sidebar-card ul { margin: 0; padding-left: 20px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.pagination .page-numbers { display: inline-block; padding: 8px 13px; border: 1px solid var(--sc-border); border-radius: 999px; text-decoration: none; background: #fff; }
.pagination .current { background: var(--sc-teal); border-color: var(--sc-teal); color: #fff; }

.site-footer { margin-top: auto; color: #d8e8eb; background: var(--sc-ink); }
.footer-main { display: grid; grid-template-columns: 1fr 1.15fr .75fr; align-items: start; gap: 22px; padding: 24px 0 20px; }
.site-footer h2, .site-footer h3 { margin: 0 0 12px; color: #fff; font-size: 1.1rem; }
.site-footer p { margin: 0; color: #bed1d6; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer section:nth-child(2) ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 18px; }
.site-footer section:nth-child(2) li { break-inside: avoid; }
.site-footer section:nth-child(2) li + li { margin-top: 0; }
.site-footer a { color: #d8e8eb; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 10px 0; color: #bed1d6; font-size: .9rem; }

@media (max-width: 900px) {
  .header-tagline { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 46px 0; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .container { width: min(100% - 24px, 560px); }
  .header-main { padding: 14px 0; }
  .header-search { display: none; }
  .menu-toggle { display: block; }
  .main-nav .nav-inner { min-height: 48px; }
  .primary-menu { display: none; width: 100%; padding: 8px 0 12px; }
  .primary-menu.is-open { display: block; }
  .primary-menu a { padding: 10px 0; }
  .primary-menu > li > ul { display: block; position: static; min-width: 0; padding: 0 0 0 14px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .primary-menu > li > ul a { color: #fff; padding: 7px 0; white-space: normal; }
  .main-nav .nav-inner { flex-wrap: wrap; }
  .card-grid, .category-grid { grid-template-columns: 1fr; }
  .content-area { padding: 34px 0 48px; }
  .footer-main { grid-template-columns: 1fr; padding: 24px 0; }
  .site-footer section:nth-child(2) ul { display: block; }
  .site-footer section:nth-child(2) li + li { margin-top: 6px; }
  .hero-card { padding: 22px; }
}
