/*
 * Retromodely – štýly pre archív, články, kontaktný formulár a stránkovanie.
 * Načítava sa po main.css a používa jeho premenné (--panel, --accent, --muted…).
 */

/* ============================================================
   MENU – aktívna položka a 7 položiek v strednej šírke
   ============================================================ */

.main-nav a.is-active {
    color: var(--accent-2);
}

.main-nav a.is-active::after {
    transform: scaleX(1);
}

@media (max-width: 1160px) and (min-width: 1051px) {
    .main-nav {
        gap: 20px;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 1000px) and (min-width: 901px) {
    .main-nav {
        gap: 13px;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }
}

/* ============================================================
   FLASH SPRÁVY (pod fixnou hlavičkou)
   ============================================================ */

.flash-area {
    position: fixed;
    top: 168px;
    right: 24px;
    z-index: 60;
    width: min(420px, calc(100% - 48px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.flash {
    padding: 16px 20px;
    background: rgba(20, 15, 10, 0.94);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    color: var(--text);
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    animation: flash-out 0.4s ease 7s forwards;
}

.flash--success {
    border-left-color: #7fb37a;
}

.flash--error {
    border-left-color: #e0705a;
}

@keyframes flash-out {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flash {
        animation-duration: 0s;
    }
}

@media (max-width: 900px) {
    .flash-area {
        top: 190px;
        right: 16px;
        width: calc(100% - 32px);
    }
}

/* ============================================================
   KARTY AKO ODKAZY
   ============================================================ */

a.feature-card {
    display: block;
    transition: border-color 0.22s ease, background 0.22s ease;
}

a.feature-card:hover {
    border-color: rgba(242, 192, 120, 0.42);
}

a.feature-card:hover h3,
a.archive-card:hover h3 {
    color: var(--accent-2);
}

.feature-card h3,
.archive-card h3 {
    transition: color 0.2s ease;
}

a.archive-card {
    display: block;
}

a.archive-card:focus-visible,
a.feature-card:focus-visible,
.post-card a:focus-visible,
.filter-chips a:focus-visible,
.pagination a:focus-visible,
.item-gallery__thumbs a:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
}

/* obrázok na karte – pomer 4:3 pre fotky aj zástupné pozadie */
.archive-card__image {
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.archive-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* titulná fotka článku – po okraj karty */
.post-card__cover {
    display: block;
    margin: -32px -32px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
}

.post-card__cover img {
    width: 100%;
    aspect-ratio: 8 / 5;
    object-fit: cover;
}

/* nadpis článku je odkaz – nesmie zdediť štýl „Čítať viac“ */
.post-card h3 a {
    color: var(--text);
    font-family: inherit;
    font-size: inherit;
    text-transform: none;
    letter-spacing: normal;
    transition: color 0.2s ease;
}

.post-card h3 a:hover {
    color: var(--accent-2);
}

/* ============================================================
   VÝPIS SEKCIE
   ============================================================ */

.listing-heading {
    margin-top: 76px;
}

.listing-heading h2,
.category-intro h2 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
}

.filter-chips a {
    padding: 11px 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-chips a:hover {
    color: var(--accent-2);
    border-color: rgba(242, 192, 120, 0.4);
}

.filter-chips a.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #140d06;
    font-weight: 700;
}

.category-intro {
    max-width: 760px;
    margin-bottom: 40px;
}

.category-intro h2 {
    margin: 0;
    line-height: 1.05;
    font-weight: 400;
}

.category-intro p {
    margin: 18px 0 0;
    color: var(--muted);
    font-family: Arial, sans-serif;
    line-height: 1.75;
}

.empty-state {
    margin: 0;
    padding: 42px 32px;
    border: 1px dashed rgba(242, 192, 120, 0.25);
    color: var(--muted);
    font-family: Arial, sans-serif;
    line-height: 1.7;
    text-align: center;
}

.empty-state a {
    color: var(--accent-2);
    border-bottom: 1px solid rgba(242, 192, 120, 0.4);
}

/* ============================================================
   STRÁNKOVANIE
   ============================================================ */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

.pagination a,
.pagination span {
    min-width: 46px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    text-align: center;
}

.pagination a {
    color: var(--muted);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.pagination a:hover {
    color: var(--accent-2);
    border-color: rgba(242, 192, 120, 0.4);
}

.pagination a[rel] {
    text-transform: uppercase;
}

.pagination .is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #140d06;
    font-weight: 700;
}

/* ============================================================
   DETAIL POLOŽKY
   ============================================================ */

.page-hero--detail h1 {
    max-width: 980px;
    font-size: clamp(2.6rem, 5.5vw, 5.2rem);
    line-height: 1;
}

.breadcrumbs a {
    border-bottom: 1px solid rgba(242, 192, 120, 0.35);
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--text);
}

.item-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 54px;
    align-items: start;
}

.item-gallery__main {
    display: block;
    background: var(--bg-soft);
    border: 1px solid rgba(242, 192, 120, 0.22);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.32);
}

.item-gallery__main img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
}

.item-gallery__caption {
    margin: 14px 0 0;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
    line-height: 1.6;
}

.item-gallery__caption:empty {
    display: none;
}

.item-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.item-gallery__thumbs a {
    display: block;
    border: 1px solid var(--line);
    opacity: 0.6;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.item-gallery__thumbs a:hover,
.item-gallery__thumbs a.is-active {
    opacity: 1;
    border-color: var(--accent);
}

.item-gallery__thumbs img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.item-detail__placeholder {
    border: 1px solid rgba(242, 192, 120, 0.22);
}

.item-detail__specs .spec-list {
    margin: 0;
}

.item-detail__text {
    margin-top: 64px;
}

@media (max-width: 900px) {
    .item-detail {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* ============================================================
   DLHÝ TEXT – popis položky a článok
   ============================================================ */

.prose {
    max-width: 760px;
    color: #d6c9b5;
    font-family: Arial, sans-serif;
    font-size: 1.06rem;
    line-height: 1.85;
}

.prose p {
    margin: 0 0 1.3em;
}

.prose h2,
.prose h3 {
    margin: 2em 0 0.7em;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.15;
}

.prose h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
}

.prose h3 {
    font-size: 1.45rem;
}

.prose > :first-child {
    margin-top: 0;
}

.article-body {
    margin: 0 auto;
}

.article-perex {
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.55;
}

.article-cover {
    margin: 0 0 44px;
    border: 1px solid rgba(242, 192, 120, 0.22);
}

.article-cover img {
    width: 100%;
}

.page-hero .article-date {
    margin-top: 22px;
    color: var(--accent-2);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ============================================================
   MODEL MESIACA S VLASTNOU FOTKOU
   ============================================================ */

.model-month__visual--photo {
    background-size: cover;
    background-position: center;
}

/* ============================================================
   KONTAKTNÝ FORMULÁR
   ============================================================ */

.contact-form {
    display: grid;
    gap: 22px;
    margin-top: 8px;
}

.form-field {
    display: grid;
    gap: 9px;
}

.form-field label {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--text);
    font-family: Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    transition: border-color 0.2s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 170px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 1px var(--accent-2);
}

.form-field--error input,
.form-field--error textarea {
    border-color: #e0705a;
}

.form-field__error,
.form-errors {
    color: #f09a85;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.form-errors {
    margin: 0;
    padding-left: 18px;
}

.contact-form .btn {
    justify-self: start;
    border-radius: 0;
    cursor: pointer;
}

/* pasca na roboty – mimo obrazovky */
.form-field--hp {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 560px) {
    .contact-box {
        padding: 28px;
    }

    .contact-form .btn {
        justify-self: stretch;
    }
}

/* nepárny počet parametrov – posledný cez celú šírku, nech neostane prázdna bunka */
.item-detail__specs .spec-list > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* ============================================================
   VÝROBCOVIA
   ============================================================ */

.page-hero .page-hero__links {
    margin-top: 22px;
}

.page-hero__links a {
    color: var(--accent-2);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-bottom: 1px solid rgba(242, 192, 120, 0.4);
}

.page-hero__links a:hover {
    color: var(--text);
}

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

.maker-card {
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
        var(--panel);
    border: 1px solid var(--line);
    transition: border-color 0.22s ease;
}

.maker-card:hover {
    border-color: rgba(242, 192, 120, 0.42);
}

.maker-card:hover h3 {
    color: var(--accent-2);
}

.maker-card:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
}

/* logo na svetlej „etikete“, aby boli čitateľné aj tmavé logá */
.maker-card__logo {
    display: grid;
    place-items: center;
    height: 150px;
    padding: 24px 32px;
    background: #efe6d6;
    border-bottom: 1px solid var(--line);
}

.maker-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* bez loga – veľké začiatočné písmeno */
.maker-card__logo span {
    color: #8a5a27;
    font-size: 4.2rem;
    line-height: 1;
}

.maker-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px 30px 30px;
}

.maker-card__meta {
    min-height: 1em;
    margin: 0 0 14px;
    color: var(--accent-2);
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.maker-card h3 {
    margin: 0 0 14px;
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 400;
    transition: color 0.2s ease;
}

.maker-card__body > p:not(.maker-card__meta) {
    margin: 0 0 22px;
    color: var(--muted);
    font-family: Arial, sans-serif;
    line-height: 1.7;
}

.maker-card__count {
    margin-top: auto;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.maker-detail {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.maker-detail--text-only {
    grid-template-columns: 1fr;
}

.maker-detail__logo {
    display: grid;
    place-items: center;
    padding: 36px;
    background: #efe6d6;
    border: 1px solid rgba(242, 192, 120, 0.22);
}

.maker-detail__logo img {
    max-height: 200px;
    object-fit: contain;
}

/* odkaz na výrobcu v tabuľke parametrov */
.spec-list strong a {
    border-bottom: 1px solid rgba(242, 192, 120, 0.45);
    transition: color 0.2s ease;
}

.spec-list strong a:hover {
    color: var(--accent-2);
}

/* odkazy v pätičke */
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.footer-nav a:hover {
    color: var(--accent-2);
}

@media (max-width: 1050px) {
    .maker-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .maker-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .maker-detail__logo {
        max-width: 320px;
    }
}

@media (max-width: 560px) {
    .maker-grid {
        grid-template-columns: 1fr;
    }
}
