/*
Theme Name: Erekcija.si
Theme URI: https://erekcija.si/
Author: Erekcija.si
Description: Lahka rekonstrukcija portala Erekcija.si z ohranjenimi URL-ji.
Version: 0.2.2
Text Domain: erekcija-si
*/

:root {
  --ink: #1d2733;
  --muted: #77808a;
  --blue: #1fb9fb;
  --blue-dark: #1fa8e2;
  --nav: #20252a;
  --line: #e7e9ec;
  --panel: #f5f6f7;
  --white: #fff;
  --max: 1170px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #eceff1;
  font-family: Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--blue-dark); text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
.site-shell { max-width: 1230px; margin: 0 auto; background: var(--white); box-shadow: 0 0 18px rgba(0,0,0,.08); }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.topbar { border: 0; color: #f5f5f5; font-size: 12px; background: #282c2e; }
.topbar-inner { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.utility-menu, .main-menu, .footer-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
.utility-menu a { color: #fff; }
.brandbar { height: 140px; display: flex; align-items: center; justify-content: flex-start; padding: 0 15px; }
.site-logo img { display: block; width: 231px; height: 56px; object-fit: contain; max-width: 80vw; }

.navbar { background: transparent; border: 0; }
.navbar-inner { min-height: 61px; display: flex; align-items: stretch; justify-content: space-between; background: var(--blue); padding: 0; }
.main-menu { gap: 0; }
.main-menu a { display: flex; align-items: center; min-height: 61px; padding: 0 16px; color: white; font-weight: 700; text-transform: uppercase; font-size: 13px; }
.main-menu a:hover, .main-menu .current-menu-item > a, .home .main-menu li:first-child > a { background: rgba(255,255,255,.24); }
.search-toggle { width: 52px; display: grid; place-items: center; color: white; background: transparent; border: 0; font-size: 20px; }
.menu-toggle { display: none; color: white; background: transparent; border: 0; font-size: 25px; }

.page-body { padding: 30px 0 60px; }
.content-grid { display: grid; grid-template-columns: 750px 345px; gap: 45px; }
.section-title { margin: 0 0 22px; padding-bottom: 9px; border-bottom: 2px solid var(--ink); font-size: 18px; text-transform: uppercase; line-height: 1.2; }
.section-title span { border-bottom: 4px solid var(--blue); padding-bottom: 8px; }

.lead-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 38px; }
.lead-card { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.lead-card img { width: 100%; aspect-ratio: 7/5; object-fit: cover; display: block; }
.lead-card h2 { margin: 13px 0 7px; font-size: 20px; line-height: 1.25; }
.lead-card p { color: #626a72; margin: 0; font-size: 14px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #9298a0; font-size: 11px; text-transform: uppercase; margin: 8px 0 12px; }
.category-label { color: var(--blue-dark); font-weight: 700; }

.post-list { display: grid; gap: 22px; }
.post-row { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.post-row img { width: 100%; aspect-ratio: 1.44/1; object-fit: cover; }
.post-row h2 { margin: 0 0 5px; font-size: 22px; line-height: 1.25; }
.post-row p { margin: 0; color: #616972; }

.sidebar-widget { margin-bottom: 34px; }
.sidebar-widget h3 { font-size: 15px; text-transform: uppercase; border-bottom: 2px solid var(--ink); margin: 0 0 18px; padding-bottom: 9px; }
.sidebar-widget h3 span { border-bottom: 4px solid var(--blue); padding-bottom: 8px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sidebar-list a { color: var(--ink); font-weight: 700; line-height: 1.35; display: block; }
.sidebar-list time { color: #9298a0; font-size: 11px; }

.breadcrumbs { color: #aaa; display: flex; gap: 7px; font-size: 12px; margin-bottom: 25px; }
.breadcrumbs a { color: #777; }
.article-header { border: 0; margin-bottom: 28px; padding: 0; }
.article-header h1 { color: var(--blue); font: 700 40px/1.15 "Open Sans",Arial,sans-serif; margin: 0; letter-spacing: -.5px; }
.article-content { font-family: "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.8; }
.article-content h2 { color: var(--blue); font-family: Roboto, Arial, sans-serif; font-size: 34px; font-weight: 400; margin: 34px 0 12px; }
.article-content h3 { font-family: Roboto, Arial, sans-serif; font-size: 21px; margin: 28px 0 10px; }
.article-content img { margin: 18px auto; display: block; }
.article-content ul, .article-content ol { padding-left: 24px; }
.article-body-wrap { position: relative; }
.share-rail { position: absolute; left: 0; top: 0; width: 56px; display: grid; }
.share-rail a { display: grid; place-items: center; width: 56px; height: 48px; color: white; font-weight: 700; font-size: 16px; }
.share-facebook { background: #516eab; }
.share-twitter { background: #55acee; }
.share-google { background: #dd4b39; }
.share-linkedin { background: #0077b5; }
.single .article-content { padding-left: 90px; }

.home-container, .content-grid { width: min(calc(100% - 60px), 1140px); }
.home-container { padding: 0; }
.home .page-body { padding-bottom: 155px; }
.hero-mosaic { height: 540px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 180px); margin-bottom: 60px; }
.hero-tile { position: relative; overflow: hidden; min-width: 0; }
.hero-tile-1 { grid-row: 1 / span 2; grid-column: 1; }
.hero-tile-2 { grid-row: 1; grid-column: 2; }
.hero-tile-3 { grid-row: 1; grid-column: 3; }
.hero-tile-4 { grid-row: 2; grid-column: 2; }
.hero-tile-5 { grid-row: 2 / span 2; grid-column: 3; }
.hero-tile-6 { grid-row: 3; grid-column: 1; }
.hero-tile-7 { grid-row: 3; grid-column: 2; }
.hero-image, .hero-image img, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-image img { object-fit: cover; transition: transform .35s ease; }
.hero-image:hover img { transform: scale(1.04); }
.hero-shade { background: linear-gradient(to bottom, transparent 28%, rgba(0,0,0,.72)); }
.hero-copy { position: absolute; z-index: 2; left: 25px; right: 25px; bottom: 24px; }
.hero-category { display: inline-block; padding: 3px 6px 4px; margin-bottom: 7px; color: white; background: var(--blue); font-size: 11px; line-height: 11px; text-transform: uppercase; }
.hero-copy h2 { margin: 0; font: 700 18px/1.35 "Open Sans",Arial,sans-serif; }
.hero-copy h2 a { color: white; }
.hero-tile-1 .hero-copy h2, .hero-tile-5 .hero-copy h2 { font-size: 22px; }
.home-featured-pages { display: grid; grid-template-columns: repeat(3,1fr); gap: 40px; margin-bottom: 50px; }
.featured-page-card img { width: 100%; height: 253px; object-fit: cover; }
.featured-page-card h2 { margin: 14px 0 8px; font: 700 22px/1.3 "Open Sans",Arial,sans-serif; }
.featured-page-card p { color: #62676b; margin: 0; }
.home-sections-grid { display: grid; grid-template-columns: 750px 345px; gap: 45px; }
.module-title { border-bottom: 2px solid #282c2e; font-size: 16px; line-height: 1; margin: 0 0 20px; text-transform: uppercase; }
.module-title span { display: inline-block; border-bottom: 4px solid var(--blue); padding: 0 0 9px; margin-bottom: -3px; }
.category-module { margin-bottom: 40px; }
.module-post { display: grid; grid-template-columns: 120px 1fr; gap: 15px; margin-bottom: 14px; }
.module-post img { width: 120px; height: 86px; object-fit: cover; }
.module-post h3 { font: 700 15px/1.35 "Open Sans",Arial,sans-serif; margin: 0 0 5px; }
.module-post time { color: #aaa; font-size: 11px; }
.module-post-lead { grid-template-columns: 350px 1fr; width: 100%; margin-bottom: 20px; }
.module-post-lead img { width: 350px; height: 250px; }
.module-post-lead h3 { font-size: 21px; }
.module-post-lead p { color: #666; }
.recommended-widget h3 { border-color: #e7e7e7; }
.recommended-widget h3 span { display: inline-block; color: white; background: var(--blue); padding: 10px 15px; border: 0; margin-bottom: -2px; text-transform: none; font-size: 16px; }
.recommended-list { list-style: none; padding: 0; margin: 28px 0 40px; }
.recommended-list li { display: grid; grid-template-columns: 120px 1fr; gap: 15px; margin-bottom: 25px; }
.recommended-thumb img { width: 120px; height: 86px; object-fit: cover; }
.recommended-list li div > a { font: 700 15px/1.4 "Open Sans",Arial,sans-serif; }
.recommended-list time { display: block; color: #aaa; font-size: 10px; text-transform: uppercase; margin-top: 8px; }
.sidebar-ad { width: 345px; height: 345px; object-fit: cover; }
.category-title { color: var(--blue); font: 700 36px/1.2 "Open Sans",Arial,sans-serif; padding-bottom: 15px; margin: 0 0 38px; border-bottom: 3px solid #eee; text-transform: none; }
.category-post { border-bottom: 1px solid #eee; padding-bottom: 30px; margin-bottom: 25px; }
.category-post h2 { font: 700 24px/1.3 "Open Sans",Arial,sans-serif; margin: 0 0 12px; }
.category-post-meta { display: flex; gap: 13px; color: #aaa; font-size: 10px; text-transform: uppercase; margin-bottom: 20px; }
.category-post-meta strong { color: var(--blue); }
.category-post-body { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.category-post-body img { width: 280px; height: 141px; object-fit: cover; }
.category-post-body p { color: #666; margin: 0 0 14px; }
.read-more { display: inline-block; color: #555; border: 1px solid #ddd; box-shadow: 0 1px 2px rgba(0,0,0,.08); padding: 7px 18px; font-size: 11px; text-transform: uppercase; }
.topic-posts { clear: both; margin-top: 45px; }
.topic-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.topic-post-grid img { width: 100%; height: 145px; object-fit: cover; }
.topic-post-grid h3 { font: 700 16px/1.35 "Open Sans",Arial,sans-serif; margin: 10px 0 4px; }
.topic-post-grid time { color: #aaa; font-size: 11px; }
.article-content input:not([type="submit"]), .article-content textarea { display: block; width: 100%; border: 1px solid #ddd; padding: 11px 12px; font: inherit; }
.article-content textarea { min-height: 180px; resize: vertical; }
.article-content input[type="submit"] { border: 0; background: var(--blue); color: white; padding: 11px 24px; font-weight: 700; }

.site-footer { width: 100vw; margin-left: calc(50% - 50vw); background: #f5f5f5; color: #666; padding: 0; }
.footer-grid { height: 470px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding-top: 60px; }
.footer-grid > section { padding: 0 15px; }
.footer-logo { display: block; width: 309px; height: 61px; margin-bottom: 15px; filter: none; opacity: 1; }
.footer-grid p { max-width: 350px; margin: 0; }
.site-footer h3 { color: var(--blue); font-size: 16px; text-transform: none; margin: 0 0 20px; }
.site-footer a { color: #555; }
.footer-posts, .footer-categories { list-style: none; margin: 0; padding: 0; }
.footer-posts li { position: relative; min-height: 86px; padding-left: 75px; margin-bottom: 8px; }
.footer-posts li:before { content: ""; position: absolute; left: 0; top: 0; width: 60px; height: 60px; background: #eee; }
.footer-posts a { color: var(--blue); font-weight: 700; line-height: 1.35; }
.footer-posts time { display: block; color: #999; font-size: 10px; margin-top: 4px; }
.footer-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 20px; }
.footer-categories a { font-weight: 700; font-size: 12px; }
.footer-bottom { height: 106px; border-top: 1px solid #e3e3e3; padding: 34px 15px; font-size: 11px; display: flex; justify-content: space-between; gap: 20px; }
.footer-menu { flex-wrap: wrap; gap: 18px; }

.pagination { margin-top: 30px; display: flex; gap: 8px; }
.pagination .page-numbers { border: 1px solid var(--line); padding: 7px 12px; color: var(--ink); }
.pagination .current { background: var(--blue); color: white; border-color: var(--blue); }
.empty-state { padding: 40px; background: var(--panel); }

@media (max-width: 900px) {
  body { background: white; }
  .site-shell { box-shadow: none; }
  .content-grid, .home-sections-grid { grid-template-columns: 1fr; }
  .sidebar { border-top: 1px solid var(--line); padding-top: 30px; }
  .lead-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar, .brandbar { display: none; }
  .navbar-inner { min-height: 60px; }
  .navbar { background: var(--blue); }
  .main-menu { display: none; position: absolute; left: 0; right: 0; top: 54px; z-index: 20; background: var(--nav); flex-direction: column; align-items: stretch; }
  .main-menu.is-open { display: flex; }
  .main-menu a { padding-inline: 20px; border-top: 1px solid #353b40; }
  .navbar-inner { position: relative; }
  .menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .home-container { width: 100%; }
  .hero-mosaic { height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 180px); }
  .hero-tile { grid-column: auto; grid-row: auto; }
  .hero-tile-1 { grid-row: 1 / span 2; }
  .hero-tile-5 { grid-row: 3 / span 2; grid-column: 2; }
  .home-featured-pages, .home-sections-grid { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .topbar-inner { min-height: 30px; justify-content: center; }
  .utility-menu { display: none; }
  .brandbar { min-height: 86px; padding: 15px 0; }
  .site-logo img { width: 245px; }
  .page-body { padding-top: 24px; }
  .hero-mosaic { display: block; margin-bottom: 35px; }
  .hero-tile { height: 220px; }
  .hero-tile:not(:first-child) { display: none; }
  .home-featured-pages { grid-template-columns: 1fr; gap: 30px; }
  .lead-grid { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 120px minmax(0,1fr); gap: 14px; }
  .post-row h2 { font-size: 17px; }
  .post-row p { display: none; }
  .article-header h1 { font-size: 31px; }
  .article-content { font-size: 16px; }
  .article-content *, .article-content figure[style], .article-content .wp-caption { max-width: 100%; width: auto !important; }
  .single .article-content { padding-left: 0; }
  .share-rail { position: static; display: flex; width: auto; margin-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom .container { flex-direction: column; }
  .module-post, .module-post-lead { grid-template-columns: 110px minmax(0, 1fr); }
  .module-post img, .module-post-lead img { width: 110px; height: 80px; }
  .module-post-lead p { display: none; }
  .category-post-body { grid-template-columns: 120px minmax(0, 1fr); gap: 15px; }
  .category-post-body img { width: 120px; height: 86px; }
  .topic-post-grid { grid-template-columns: 1fr; }
  .site-footer { min-height: auto; }
  .footer-grid { height: auto; padding: 40px 20px; }
  .footer-bottom { height: auto; padding: 25px 20px; flex-direction: column; }
}
