/*
Theme Name: Pekara Maletić – Tehnički Portal
Theme URI: https://pekaramaletic.com/
Author: Custom
Description: Lightweight custom WordPress tema za portal tehničkih listova Pekare Maletić.
Version: 1.1.0
Text Domain: pmportal
*/

:root {
    --pm-accent: #ef8b00;
    --pm-panel: #0d9fb0;
    --pm-text: #101010;
    --pm-muted: #6a6a6a;
    --pm-border: #d8d8d8;
    --pm-surface: #ffffff;
    --pm-max: 1540px;
    --pm-font-heading: "FONTSPRING DEMO - Bogue", "Bogue", Georgia, "Times New Roman", serif;
    --pm-font-body: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { margin: 0; padding: 0; }
body {
    margin: 0;
    min-width: 320px;
    background: #fff;
    color: var(--pm-text);
    font-family: var(--pm-font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.pmportal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 42%) minmax(0, 58%);
    background: #fff;
}

.pmportal-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: var(--pm-panel);
    color: #fff;
}

.pmportal-visual::before,
.pmportal-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
.pmportal-visual::before { width: 460px; height: 460px; left: -200px; top: -180px; }
.pmportal-visual::after { width: 360px; height: 360px; right: -170px; bottom: -120px; }

.pmportal-visual-inner {
    position: relative;
    z-index: 2;
    min-height: 100%;
    width: min(100%, 720px);
    margin-left: auto;
    padding: 34px 0 34px 34px;
    display: flex;
    flex-direction: column;
}

.pmportal-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    min-height: 48px;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.02em;
}
.pmportal-brand img,
.pmportal-brand .custom-logo {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 56px;
    object-fit: contain;
}

.pmportal-hero {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 32px 0 48px;
}

.pmportal-hero-media {
    position: relative;
    width: min(100%, 540px);
    aspect-ratio: 4 / 5.4;
    margin-left: auto;
    overflow: hidden;
    background: #0a7f8d;
    box-shadow: 0 30px 70px rgba(0,0,0,.18);
}
.pmportal-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pmportal-hero-media.is-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 46px;
    background:
        radial-gradient(circle at 22% 20%, rgba(255,255,255,.18), transparent 32%),
        linear-gradient(145deg, #0a7f8d, #075f69);
}
.pmportal-fallback-card {
    width: min(100%, 340px);
    aspect-ratio: .78;
    border-radius: 22px;
    padding: 32px;
    background: #fff;
    color: #111;
    box-shadow: 0 28px 60px rgba(0,0,0,.18);
    transform: rotate(-3deg);
}
.pmportal-fallback-card::before {
    content: "PDF";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 40px;
    border-radius: 10px;
    background: var(--pm-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}
.pmportal-fallback-lines { margin-top: 34px; display: grid; gap: 14px; }
.pmportal-fallback-lines span { display: block; height: 10px; border-radius: 99px; background: #e8e8e8; }
.pmportal-fallback-lines span:nth-child(2) { width: 84%; }
.pmportal-fallback-lines span:nth-child(3) { width: 62%; }
.pmportal-fallback-code { margin-top: 38px; font-size: 42px; line-height: 1; font-weight: 850; letter-spacing: -.05em; }
.pmportal-fallback-caption { margin-top: 10px; color: #777; font-size: 14px; }

.pmportal-visual-footer {
    padding: 0 28px 0 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255,255,255,.78);
    font-size: 13px;
}
.pmportal-visual-footer a { text-decoration: none; }
.pmportal-visual-footer a:hover { color: #fff; }

.pmportal-content {
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 34px clamp(34px, 6vw, 110px) 30px;
}

.pmportal-content-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 48px;
    color: var(--pm-accent);
    font-size: 14px;
    font-weight: 750;
}
.pmportal-content-top a { text-decoration: none; }
.pmportal-content-top a:hover { text-decoration: underline; }

.pmportal-content-main {
    width: min(100%, 760px);
    margin: auto;
    padding: 54px 0 76px;
}
.pmportal-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--pm-accent);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.pmportal-title {
    margin: 0;
    font-family: var(--pm-font-heading);
    max-width: 760px;
    font-size: clamp(38px, 4.5vw, 64px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 600;
}
.pmportal-intro {
    margin: 22px 0 34px;
    max-width: 650px;
    color: var(--pm-muted);
    font-size: 16px;
    line-height: 1.65;
}
.pmportal-plugin-missing {
    padding: 18px 20px;
    border: 1px solid #f2d48d;
    border-radius: 10px;
    background: #fff9ea;
    color: #5a4309;
    line-height: 1.55;
}
.pmportal-content-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    color: #888;
    font-size: 12px;
}
.pmportal-content-footer a { color: var(--pm-accent); text-decoration: none; }
.pmportal-content-footer a:hover { text-decoration: underline; }

/* Plugin integration */
.pmportal-content-main .pmtds-card { max-width: none; }
.pmportal-content-main .pmtds-search-form { grid-template-columns: minmax(0, 1.45fr) minmax(130px, .58fr) auto; }
.pmportal-content-main .pmtds-button { min-height: 50px; }

/* Heading typography */
h1, h2, h3, h4, h5, h6,
.pmtds-card h2,
.pmtds-card h3,
.pmtds-result-title {
    font-family: var(--pm-font-heading);
}

/* Generic pages */
.pmportal-generic {
    width: min(100% - 40px, 960px);
    margin: 0 auto;
    padding: 80px 0;
}
.pmportal-generic h1,
.pmportal-generic h2,
.pmportal-generic h3,
.pmportal-generic h4,
.pmportal-generic h5,
.pmportal-generic h6 { font-family: var(--pm-font-heading); }
.pmportal-generic h1 { font-size: clamp(34px, 5vw, 58px); letter-spacing: -.04em; font-weight: 600; }
.pmportal-generic p, .pmportal-generic li { line-height: 1.7; }

@media (max-width: 1100px) {
    .pmportal-shell { grid-template-columns: minmax(320px, 40%) minmax(0, 60%); }
    .pmportal-visual-inner { padding-left: 24px; }
    .pmportal-content { padding-left: 42px; padding-right: 42px; }
    .pmportal-content-main .pmtds-search-form { grid-template-columns: 1fr 150px; }
    .pmportal-content-main .pmtds-search-form > .pmtds-button { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 780px) {
    .pmportal-shell { display: block; }

    /* Na mobile lijevi vizuel postaje samo kompaktno zaglavlje. */
    .pmportal-visual {
        min-height: 0;
        border-radius: 0 0 18px 18px;
    }
    .pmportal-visual::before,
    .pmportal-visual::after { display: none; }
    .pmportal-visual-inner {
        min-height: 0;
        width: 100%;
        padding: 12px 18px;
        display: block;
    }
    .pmportal-brand {
        min-height: 34px;
        font-size: 17px;
    }
    .pmportal-brand img,
    .pmportal-brand .custom-logo {
        max-height: 36px;
        max-width: 170px;
    }
    .pmportal-hero,
    .pmportal-visual-footer { display: none !important; }

    .pmportal-content { min-height: auto; padding: 18px 20px 24px; }
    .pmportal-content-top { display: none; }
    .pmportal-content-main { width: 100%; padding: 28px 0 34px; }
    .pmportal-title {
        font-size: clamp(38px, 12.5vw, 56px);
        line-height: .96;
        letter-spacing: -.045em;
    }
    .pmportal-intro { margin: 17px 0 28px; font-size: 15px; }
    .pmportal-content-main .pmtds-search-form { grid-template-columns: 1fr; }
    .pmportal-content-main .pmtds-search-form > .pmtds-button { grid-column: auto; width: 100%; }
    .pmportal-content-footer { justify-content: flex-start; }
}

.pmportal-brand .custom-logo-link,
.pmportal-brand > a { display: inline-flex; align-items: center; color: #fff; text-decoration: none; }
