/*
Theme Name: Corivia
Theme URI: https://corivia.pl
Author: Corivia
Description: Motyw Corivia — veterinary brand website
Version: 1.0.0
Requires at least: 5.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: corivia
*/

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --brand:       #004B45;
    --brand-dark:  #0a3830;
    --text:        #004B45;
    --muted:       #6b7c78;
    --light:       #f5f7f6;
    --white:       #ffffff;
    --border:      #e2e8e6;
    --header-h:    70px;
    --font:        'Inter', 'Segoe UI', sans-serif;
    --tr:          0.25s ease;

    --prod-green:  #56EDA0;
    --prod-yellow: #FEC629;
    --prod-purple: #AC95DD;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.65;
    background: var(--white);
    overflow-x: hidden;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }

#produkty, #kontakt { scroll-margin-top: var(--header-h); }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 8px;
    max-width: 1280px;
    margin: 0 auto;
}

.header-rainbow {
    height: 4px;
    background: linear-gradient(90deg,
        #4caf7f 0%,
        #00bcd4 18%,
        #f5c518 36%,
        #ff9800 54%,
        #e91e63 72%,
        #9c27b0 90%,
        #673ab7 100%
    );
}

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.site-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.site-logo img {
    height: 32px;
    width: auto;
}

.site-logo-tagline {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.main-nav ul li a {
    display: block;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--brand);
    transition: color var(--tr);
}

.main-nav ul li a:hover {
    color: var(--prod-green);
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brand);
    transition: var(--tr);
    border-radius: 2px;
}

/* ── Hero – Homepage ────────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--header-h) - 4px - 56px);
    background-image: url('/wp-content/graphics/lab.jpg');
    background-size: cover;
    background-position: center;
    overflow: visible;
}

.hero-box {
    position: absolute;
    bottom: 0;
    left: max(8px, calc((100% - 1280px) / 2 + 8px));
    transform: translateY(6%);
    z-index: 1;
    background: #56EDA0;
    color: var(--text);
    padding: 44px 52px;
    max-width: 780px;
    border-radius: 6px;
}

.hero-label-logo {
    height: 26px;
    width: auto;
    display: block;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--brand);
}

.hero-desc {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(0,0,0,0.68);
}

/* ── Products section ───────────────────────────────────────────────────────── */
#produkty {
    margin-top: 140px;
    padding: 0px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.produkty-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.produkty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.produkty-icon img {
    height: 110px;
    width: auto;
}

.produkty-subtitle {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 80px;
}

.produkty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 8px;
}

/* ── Product card ───────────────────────────────────────────────────────────── */
.produkt-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: var(--card-color, var(--brand));
    border-radius: 10px;
    padding: 36px 28px 28px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--tr), transform var(--tr);
    min-height: 440px;
}

.produkt-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    transform: translateY(-4px);
}

.produkt-card__img {
    order: 3;
    width: 100%;
    height: 260px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 0;
}

.produkt-card__img img {
    max-height: 260px;
    width: auto;
    object-fit: contain;
}

.produkt-card__name {
    order: 1;
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 12px;
    line-height: 1.2;
}

.produkt-card__name .prefix {
    font-weight: 800;
    color: var(--text);
}

.produkt-card__desc {
    order: 2;
    font-size: 13.5px;
    line-height: 1.75;
    color: rgba(0,0,0,0.65);
}

/* ── Why Corivia section ────────────────────────────────────────────────────── */
.why-section {
    background-image: url('/wp-content/graphics/lines_bg.png');
    background-size: cover;
    background-position: center;
    margin-top: -160px;
    padding: 240px 0 80px;
    color: var(--white);
}

.why-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 8px;
}

.why-header {
    margin-bottom: 52px;
}

.why-logo {
    height: 26px;
    width: auto;
    margin-bottom: 16px;
}

.why-title {
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.why-col__heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 14px;
    line-height: 1.4;
}

.why-grid .why-col:nth-child(1) .why-col__heading { color: var(--prod-green); }
.why-grid .why-col:nth-child(2) .why-col__heading { color: var(--prod-yellow); }
.why-grid .why-col:nth-child(3) .why-col__heading { color: var(--prod-purple); }

.why-col__text {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--white);
}

/* ── Contact section ────────────────────────────────────────────────────────── */
#kontakt {
    display: grid;
    grid-template-columns: 3fr 1fr;
    padding-right: max(8px, calc((100vw - 1280px) / 2 + 8px));
}

.kontakt-content {
    padding: 72px 52px 72px max(8px, calc((100vw - 1280px) / 2 + 8px));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kontakt-title {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 36px;
}

.kontakt-details {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

.kontakt-details:last-child {
    margin-bottom: 0;
}

.kontakt-details p {
    margin: 0;
}

.kontakt-details a {
    color: var(--brand);
    transition: color var(--tr);
}

.kontakt-details a:hover {
    color: var(--prod-green);
}

.kontakt-img {
    position: relative;
    overflow: hidden;
}

.kontakt-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--brand);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.3px;
}

/* ── Page hero (subpages) ───────────────────────────────────────────────────── */
.page-hero {
    position: relative;
    min-height: 34vh;
    background-image: url('/wp-content/graphics/lab.jpg');
    background-size: cover;
    background-position: center;
    overflow: visible;
}

.page-hero__box {
    position: absolute;
    bottom: 0;
    left: max(8px, calc((100% - 1280px) / 2 + 8px));
    transform: translateY(66%);
    z-index: 1;
    padding: 40px 52px;
    max-width: 480px;
    border-radius: 6px;
    color: var(--white);
}

.page-hero__box--colored {
    color: var(--text);
}

.page-hero__box--colored .page-hero__name {
    font-weight: 400;
}

.page-hero__box--colored .page-hero__name .prefix {
    font-weight: 800;
}

.page-hero__box--colored .page-hero__subtitle {
    opacity: 1;
    color: var(--text);
}

.page-hero__name {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
}

.page-hero__name .prefix {
    /* color set inline */
}

.page-hero__subtitle {
    font-size: 15px;
    line-height: 1.65;
    opacity: 0.88;
    max-width: 460px;
}

/* ── Product detail ─────────────────────────────────────────────────────────── */
.produkt-intro {
    padding: 176px 8px 52px;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 64px;
    align-items: center;
}

.produkt-intro__text {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
}

.produkt-intro__text p { margin-bottom: 1.2em; }
.produkt-intro__text p:last-child { margin-bottom: 0; }

.produkt-intro__img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.produkt-intro__img img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

/* "Dlaczego warto" section */
.produkt-dlaczego {
    background: var(--light);
    padding: 64px 8px;
}

.produkt-dlaczego__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.produkt-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 28px;
}

.produkt-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.produkt-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--text);
}

.produkt-bullets li::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--bullet-color, var(--brand));
    flex-shrink: 0;
    margin-top: 8px;
}

/* Działanie + Skład */
.produkt-dzialanie-wrap {
    padding: 36px 8px 64px;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.produkt-sklad-box {
    padding: 32px 36px;
    border-radius: 6px;
}

.produkt-sklad-box .produkt-section-title {
    color: inherit;
}

.produkt-sklad-text {
    font-size: 14px;
    line-height: 1.8;
}

/* ── Generic page / 404 ─────────────────────────────────────────────────────── */
.corivia-wrap {
    max-width: 840px;
    margin: 0 auto;
    padding: 72px 40px 80px;
    min-height: 60vh;
}

.corivia-wrap h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--brand);
}

.corivia-wrap .entry-content {
    font-size: 15px;
    line-height: 1.85;
}

.corivia-wrap .entry-content p  { margin-bottom: 1.2em; }
.corivia-wrap .entry-content h2 { font-size: 22px; margin: 1.5em 0 0.5em; }
.corivia-wrap .entry-content ul,
.corivia-wrap .entry-content ol { margin: 0.8em 0 0.8em 1.6em; list-style: initial; }
.corivia-wrap .entry-content li { margin-bottom: 0.3em; }
.corivia-wrap .entry-content a  { color: var(--brand); text-decoration: underline; }

.not-found-hero {
    position: relative;
    min-height: calc(100vh - var(--header-h) - 4px);
    background-image: url('/wp-content/graphics/lab.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.not-found-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 56, 48, 0.60);
}

.not-found-box {
    position: relative;
    z-index: 1;
    color: var(--white);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.not-found-code {
    display: block;
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 800;
    line-height: 1;
    color: var(--white);
    margin-bottom: 24px;
    letter-spacing: -4px;
}

.not-found-title {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 20px;
}

.not-found-desc {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 13px 32px;
    background: var(--brand);
    color: var(--white);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background var(--tr);
}

.btn:hover { background: var(--brand-dark); }

/* ── Kontakt page ───────────────────────────────────────────────────────────── */
.kontakt-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 8px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.kontakt-page h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 36px;
    grid-column: 1 / -1;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .produkt-intro { grid-template-columns: 1fr; padding: 156px 40px 40px; }
    .produkt-intro__img { order: -1; }
    .produkt-intro__img img { max-height: 260px; }
    .produkt-dzialanie-wrap { grid-template-columns: 1fr; padding: 28px 40px 52px; }
    .produkt-dlaczego { padding: 52px 40px; }
    #kontakt { grid-template-columns: 1fr; padding-right: 0; }
    .kontakt-img { height: 360px; }
    .kontakt-content { padding: 52px 32px; }
}

@media (max-width: 900px) {
    .why-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-copy { display: none; }
}

@media (max-width: 768px) {
    .header-inner { padding: 0 20px; }
    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: calc(var(--header-h) + 4px);
        left: 0; right: 0;
        background: var(--white);
        padding: 16px 20px 24px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        transform: translateY(-110%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: none;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
    .main-nav ul li a { padding: 14px 8px; font-size: 12px; }

    .hero-section { display: flex; flex-direction: column; padding: 32px 0; }
    .hero-box {
        position: relative;
        bottom: auto; left: auto; right: auto;
        transform: none;
        margin: auto 16px 0;
        width: calc(100% - 32px);
        max-width: none;
        padding: 28px 24px;
        border-radius: 6px;
    }
    .hero-title { font-size: 26px; }

    .produkty-grid { grid-template-columns: 1fr; max-width: 400px; padding: 0; }
    .why-inner { padding: 0; }

    #produkty { padding-bottom: 48px; }
    .why-section { margin-top: 0; padding: 56px 20px; }

    .footer-inner { flex-direction: column; gap: 10px; padding: 24px 20px; text-align: center; }
    .footer-copy { display: block; }

    .page-hero__box { padding: 28px 24px; left: 20px; right: 20px; max-width: none; }
    .page-hero__name { font-size: 30px; }

    .produkt-intro { padding-top: 220px; }

    .kontakt-page { grid-template-columns: 1fr; padding: 52px 24px; }
    .kontakt-page h1 { grid-column: 1; }
}

@media (max-width: 600px) {
    #produkty { padding: 24px 20px 48px; min-height: 100vh; }
    .produkty-intro {
        justify-content: center;
        min-height: calc(100vh - var(--header-h) - 4px - 24px);
    }
    .produkty-icon { margin-bottom: 28px; }
    .produkty-icon img { height: 220px; }
    .produkty-subtitle { font-size: 34px; line-height: 1.35; letter-spacing: 2px; padding: 0 12px; margin-bottom: 0; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 22px; }
    .hero-desc { font-size: 13px; }
    .produkty-icon img { height: 170px; }
    .produkty-subtitle { font-size: 28px; }
    .produkt-card { padding: 28px 20px 24px; }
    .produkt-card__name { font-size: 20px; }
}

@media (min-width: 1025px) {
    .hero-section { min-height: calc(100vh - var(--header-h) - 4px - 140px); }
    #produkty { padding-top: 0px; margin-top: 140px; }
    .hero-box { transform: translateY(calc(6% + 60px)); }
}
