/*
Theme Name: Pro Chef
Theme URI: http://localhost:8090
Author: PRO Chef
Description: Тема сайта PRO Chef. Вёрстка и контент главной страницы взяты из production без изменения дизайна.
Version: 1.0.0
Requires at least: 6.0
Text Domain: pro-chef
*/

/* Inner pages reuse the homepage hero, cards and panels at a smaller scale. */

.hero--page .hero__banner {
    height: 520px;
    padding: var(--padding-section-medium);
}

.hero--page .hero__picture::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.72) 34%, rgba(255, 255, 255, 0) 62%);
}

.hero--page .hero__heading {
    gap: var(--margin-medium);
    max-width: 720px;
}

.hero--page .hero__title,
.hero--page .hero__text {
    color: var(--color-dark-graphite);
}

.hero--page .hero__title-accent {
    color: var(--color-accent-accent);
}

.hero--page .hero__text {
    display: block;
    max-width: 640px;
}

.hero--plain .hero__banner {
    height: auto;
    min-height: 280px;
    background-color: var(--color-light-pale);
}

/* Error pages (404, 400, 401, 403, 500, 503): template-parts/http-error.php.
   Figma oiZZaHtObMV9x6DIbc1vvJ — Desktop 522:2210, Tablet 527:2042, Mobile 527:2098.
   Grey card right under the header, text and buttons at most 500px wide.
   Mobile: buttons stack full width, "Связаться с нами" first, at the card bottom. */

/* On the Apache error screens WordPress prints its global styles
   (body { padding: 0 }) after this file — keep the offset under the fixed header */
body.http-error {
    padding-top: var(--header-height);
}

body.http-error.admin-bar {
    padding-top: calc(var(--header-height) + 32px);
}

.error-page {
    padding: 0 var(--padding-section-small) var(--padding-section-small);
}

.error-page__card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    padding: var(--padding-section-large);
    border-radius: var(--radius-x-small);
    background-color: var(--color-light-neutral-15);
}

.error-page__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin-x-large);
    width: 100%;
    max-width: 500px;
}

.error-page__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin-x-medium);
    text-align: center;
}

.error-page__heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--margin-x-small);
}

.error-page__code {
    color: var(--color-dark-neutral);
    opacity: 0.6;
}

.error-page__title {
    color: var(--color-dark-primary);
    text-wrap: balance;
}

.error-page__text {
    max-width: 480px;
    color: var(--color-dark-pebble);
    text-wrap: balance;
}

.error-page__buttons {
    display: flex;
    justify-content: center;
    gap: var(--margin);
}

.error-page__button {
    width: 240px;
}

/* Label centred in the space after the icon (matters on the wide mobile button) */
.error-page__contact {
    padding-right: 36px;
}

.error-page__contact .special-button__label {
    flex: 1 0 0;
    text-align: center;
}


/* Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    .error-page__card {
        min-height: 640px;
    }

    .error-page__heading {
        gap: var(--margin-3x-small);
    }
}


/* Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 766px) {
    .error-page {
        padding: 0 var(--padding-large) var(--padding-large);
    }

    .error-page__card {
        align-items: stretch;
        min-height: 600px;
        padding: 24px;
    }

    .error-page__content {
        gap: var(--margin-medium);
        margin-inline: auto;
    }

    /* Text in the middle of the free space, buttons at the bottom */
    .error-page__info {
        flex: 1 0 auto;
        justify-content: center;
        gap: var(--margin);
    }

    /* Text as wide as the buttons (max 500 with the content), not 480 */
    .error-page__text {
        max-width: none;
    }

    .error-page__buttons {
        flex-direction: column-reverse;
        align-self: stretch;
        gap: var(--margin-x-small);
    }

    .error-page__button {
        width: 100%;
    }
}

.sheet {
    padding-block: var(--padding-section-x-large);
}

.sheet--after-hero {
    padding-top: var(--padding-section-large);
}

.sheet + .sheet {
    padding-top: 0;
}

.sheet__inner,
.doc__inner {
    display: flex;
    flex-direction: column;
    gap: var(--margin-x-large);
}

.sheet-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--margin);
}

.sheet-cards--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--margin);
    min-height: 220px;
    padding: var(--padding-x-large);
    border-radius: 10px;
    background-color: var(--color-light-neutral-15);
}

.sheet-card__number {
    color: var(--color-accent-pale-green);
}

.sheet-card__title {
    color: var(--color-dark-primary);
}

.sheet-card__text {
    color: var(--color-dark-gray);
}

.sheet-list {
    display: flex;
    flex-direction: column;
    gap: var(--margin-small);
}

.sheet-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--margin-x-small);
    color: var(--color-dark-primary);
}

.sheet-list__item .marker {
    --marker-size: 24px;
    color: var(--color-accent-accent);
}

.sheet-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--margin-x-large);
}

.sheet-note {
    color: var(--color-dark-pebble);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--margin);
    width: 100%;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--margin);
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--margin);
}

.review-grid .review-card {
    height: 100%;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: var(--margin);
    align-items: stretch;
}

.contact-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--margin-large);
    padding: var(--padding-section-small);
    border-radius: var(--radius-medium);
    color: var(--color-light-white);
    background: var(--color-accent-green-gradient);
}

.contact-panel__list {
    display: flex;
    flex-direction: column;
    gap: var(--margin-medium);
}

.contact-panel__item {
    display: flex;
    flex-direction: column;
    gap: var(--margin-3x-small);
}

.contact-panel__label {
    color: var(--color-light-pale);
}

.contact-panel__value {
    color: var(--color-light-white);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--margin);
    padding: var(--padding-section-small);
    border-radius: var(--radius-medium);
    background-color: var(--color-light-neutral-15);
}

.contact-form__title {
    color: var(--color-dark-primary);
}

.contact-form__fields {
    display: flex;
    flex-direction: column;
    gap: var(--margin);
}

.contact-form .button {
    align-self: flex-start;
}

.doc {
    padding-block: var(--padding-section-large) var(--padding-section-2x-large);
}

.doc__column {
    display: flex;
    flex-direction: column;
    gap: var(--margin-x-large);
    max-width: 760px;
}

.doc__block {
    display: flex;
    flex-direction: column;
    gap: var(--margin-small);
}

.doc__block h2,
.doc__block p,
.article p,
.article li {
    color: var(--color-dark-gray);
}

.doc__block h2,
.article h2 {
    color: var(--color-dark-primary);
}

.doc__list,
.article ul {
    display: flex;
    flex-direction: column;
    gap: var(--margin-3x-small);
    padding-left: 1.2em;
    list-style: disc;
    color: var(--color-dark-gray);
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: var(--margin);
}

.blog-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: var(--margin-large);
    align-items: center;
    padding: var(--padding-x-large);
    border-radius: 10px;
    background-color: var(--color-light-neutral-15);
    color: inherit;
    text-decoration: none;
}

.blog-card__date {
    color: var(--color-accent-accent);
}

.blog-card__title {
    color: var(--color-dark-primary);
}

.blog-card__text {
    color: var(--color-dark-gray);
}

.article {
    display: flex;
    flex-direction: column;
    gap: var(--margin);
    max-width: 760px;
}

.article__back {
    align-self: flex-start;
}

@media (max-width: 1023px) {
    .hero--page .hero__banner {
        height: auto;
        min-height: 460px;
    }

    .hero--page .hero__picture::after {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 55%, rgba(255, 255, 255, 0.2) 100%);
    }

    .sheet-cards,
    .sheet-cards--2,
    .sheet-split,
    .price-grid,
    .case-grid,
    .review-grid,
    .contact-layout,
    .blog-card {
        grid-template-columns: minmax(0, 1fr);
    }
}

.header__menu-cta {
    display: none;
}

.lead-notice {
    margin: 0;
    padding: 14px 20px;
    background: #e7f6f1;
    color: #233836;
    text-align: center;
}

.lead-notice--error {
    background: #fdecea;
    color: #6b2a24;
}

.popup__photo {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.checkbox__label a[href] {
    color: var(--color-accent-accent);
    text-decoration: underline;
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.14em;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

@media (max-width: 766px) {
    .hero--page .hero__banner,
    .hero--page .hero__heading,
    .hero--page .hero__title {
        max-width: 100%;
        min-width: 0;
    }

    .hero--page .hero__title {
        font-size: 30px;
        line-height: 36px;
        overflow-wrap: break-word;
    }

    .hero--page .hero__banner {
        min-height: 420px;
    }

    .hero--page .hero__text {
        display: block;
    }

    .contact-form .button,
    .hero--page .hero__buttons .button,
    .hero__buttons .button,
    .cta__button {
        width: 100%;
        min-height: 48px;
    }

    .header__bar {
        min-width: 0;
        gap: 8px;
    }

    .header__logo {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        padding-right: 8px;
    }

    .header__nav-bar {
        flex-shrink: 0;
    }

    .header--open {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .header--open .header__inner,
    .header--open .header__menu,
    .header--open .header__menu-nav,
    .header--open .header__card {
        min-width: 0;
        max-width: 100%;
    }

    .header--open .header__inner {
        padding-bottom: max(var(--padding), env(safe-area-inset-bottom));
    }

    .header__menu-link,
    .action-card__title,
    .action-card__text {
        overflow-wrap: anywhere;
    }

    .header__menu-cta {
        display: flex;
        align-self: stretch;
        justify-content: center;
        box-sizing: border-box;
        width: auto;
        max-width: 100%;
        min-height: 48px;
        margin: 0;
    }

    .contact-form,
    .contact-layout,
    .price-grid,
    .case-grid,
    .review-grid,
    .cases__card,
    .cases__panel,
    .price__card,
    .popup__field,
    .input,
    .input__field,
    .input__control {
        max-width: 100%;
        min-width: 0;
    }

    .input__control {
        width: 100%;
        min-height: 48px;
    }

    .cases__card,
    .price__card,
    .review-card {
        width: 100%;
    }

    img,
    picture {
        max-width: 100%;
    }

    body {
        overflow-x: clip;
    }
}

#about,
#services,
#projects,
#cases,
#calculator,
#reviews,
#maintenance,
#emergency,
#reconstruction,
#documents,
#contacts {
    scroll-margin-top: var(--header-height);
}

body.admin-bar {
    padding-top: calc(var(--header-height) + 32px);
}

body.admin-bar .header {
    top: 32px;
}

body.admin-bar #about,
body.admin-bar #services,
body.admin-bar #projects,
body.admin-bar #cases,
body.admin-bar #calculator,
body.admin-bar #reviews,
body.admin-bar #maintenance,
body.admin-bar #emergency,
body.admin-bar #reconstruction,
body.admin-bar #documents,
body.admin-bar #contacts {
    scroll-margin-top: calc(var(--header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar {
        padding-top: calc(var(--header-height) + 46px);
    }

    body.admin-bar .header {
        top: 46px;
    }

    body.admin-bar #about,
    body.admin-bar #services,
    body.admin-bar #projects,
    body.admin-bar #cases,
    body.admin-bar #calculator,
    body.admin-bar #reviews,
    body.admin-bar #maintenance,
    body.admin-bar #emergency,
    body.admin-bar #reconstruction,
    body.admin-bar #documents,
    body.admin-bar #contacts {
        scroll-margin-top: calc(var(--header-height) + 46px);
    }
}

.review-card__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

/* Team cards keep a four-up column. Desktop slider items otherwise grow
   (flex: 1 0 0) and one person becomes a full-bleed row. */
@media (min-width: 1024px) {
    .team__slider .team__card {
        flex: 0 1 calc((100% - 3 * var(--slider-gap)) / 4);
        max-width: calc((100% - 3 * var(--slider-gap)) / 4);
    }
}

/* Certificate lightbox. The preview is a button; the dialog uses existing icon buttons. */
button.documents__preview {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.documents__preview:focus-visible {
    outline: 2px solid var(--color-accent-accent);
    outline-offset: 2px;
}

.certificate {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    margin: 0;
    padding: 16px;
    border: 0;
    background: transparent;
    overflow: hidden;
}

.certificate[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate::backdrop {
    background-color: rgba(35, 38, 38, 0.8);
}

.certificate__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-width: 0;
}

.certificate__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    object-fit: contain;
    border-radius: var(--radius-2x-small);
    background-color: var(--color-light-white);
    touch-action: pan-y;
}

.certificate__nav,
.certificate__close {
    position: absolute;
    z-index: 1;
    width: 48px;
    height: 48px;
    padding: 0;
}

.certificate__prev {
    left: 0;
}

.certificate__next {
    right: 0;
}

.certificate__close {
    top: 16px;
    right: 16px;
}

.certificate__next {
    top: 50%;
    transform: translateY(-50%);
}

.certificate__prev {
    top: 50%;
    transform: translateY(-50%);
}

/* Phone: one hero chip at a time, left-aligned with the banner text. */
@media (max-width: 766px) {
    .hero__features {
        display: grid;
        justify-content: start;
        justify-items: start;
        padding-inline: var(--padding-x-large);
    }

    .hero__feature,
    .hero__feature:nth-child(n + 2) {
        display: flex;
        grid-area: 1 / 1;
        flex: 0 1 auto;
        justify-content: flex-start;
        max-width: 100%;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.5s ease;
    }

    .hero__feature:first-child {
        opacity: 1;
        visibility: visible;
    }

    .hero__features.is-ready .hero__feature {
        opacity: 0;
        visibility: hidden;
    }

    .hero__features.is-ready .hero__feature.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .hero__feature-text {
        min-width: 0;
        overflow-wrap: break-word;
        text-align: left;
    }
}

@media (max-width: 766px) and (prefers-reduced-motion: reduce) {
    .hero__feature,
    .hero__feature:nth-child(n + 2) {
        transition: none;
    }
}

/* Desktop: hero text uses the same left edge as .container below.
   The card is inset 40px, then the banner added another 80px, so the
   heading sat 80px right of the next section at 1280px and 10px left of
   it once the 1180px column centers.
   Up to ~1420px that edge is too close to the photo border (0 at 1024–1280),
   so the banner keeps at least its Figma inset of 80px. */
@media (min-width: 1024px) {
    .hero__banner,
    .hero__features {
        padding-inline: max(var(--padding-section-large), calc(50% - var(--container-width) / 2));
    }
}

.project-sheet {
    padding-top: var(--padding-section-small);
    padding-bottom: 0;
    scroll-margin-top: var(--header-height);
}

.project-sheet__inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--margin-x-large);
}

.project-sheet__intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--margin-small);
    max-width: 760px;
}

.project-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--margin-3x-small);
    margin: 0;
    color: var(--color-dark-gray);
}

.project-crumb a {
    color: var(--color-accent-accent);
    text-decoration: none;
}

.project-crumb a:hover,
.project-crumb a:focus-visible {
    text-decoration: underline;
}

.project-sheet__title {
    max-width: 760px;
    scroll-margin-top: var(--header-height);
}

.project-sheet__lead {
    max-width: 68ch;
    color: var(--color-dark-gray);
}

.project-facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, 200px);
    justify-content: start;
    gap: var(--margin) var(--margin-large);
    width: 100%;
    max-width: 760px;
    margin: 0;
}

.project-facts div {
    display: flex;
    flex-direction: column;
    gap: var(--margin-3x-small);
}

.project-facts dt {
    color: var(--color-dark-gray);
}

.project-facts dd {
    margin: 0;
    color: var(--color-dark-primary);
}

.project-sheet__story {
    width: 100%;
    max-width: 68ch;
}

.project-sheet__story img {
    max-width: 100%;
    height: auto;
}

.project-gallery-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--margin);
    width: 100%;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, 260px);
    justify-content: start;
    gap: var(--margin);
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-gallery__thumb {
    position: relative;
    display: block;
    width: 260px;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background: none;
    cursor: pointer;
}

.project-gallery__thumb img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-gallery__thumb:focus-visible {
    outline: 2px solid var(--color-accent-accent);
    outline-offset: 2px;
}

.project-more-section__title {
    margin-bottom: var(--margin-large);
}

.project-more {
    display: flex;
    flex-wrap: wrap;
    gap: var(--margin);
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-sheet + .cta.section-panel {
    min-height: 0;
    margin-top: var(--padding-section-small);
}

.project-sheet + .cta .cta__inner {
    gap: var(--margin-x-large);
}

.project-more-section {
    padding-top: var(--padding-section-large);
}

.project-more__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--margin-2x-small);
    flex: 0 1 260px;
    width: 260px;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.project-more__photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-medium);
}

.project-more__title {
    color: var(--color-dark-primary);
}

.project-more__location {
    color: var(--color-dark-gray);
}

.project-more__card:hover .project-more__title,
.project-more__card:focus-visible .project-more__title {
    color: var(--color-accent-accent);
}

@media (max-width: 766px) {
    .project-facts {
        grid-template-columns: repeat(2, minmax(0, 200px));
    }

    .project-gallery {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 260px));
    }

    .project-gallery__thumb {
        width: 100%;
    }

    .project-more__card {
        flex-basis: 260px;
        width: min(260px, 100%);
        max-width: 260px;
    }
}

/* Light elevation under the fixed bar once the page has moved. */
.header__inner {
    transition: box-shadow 180ms ease;
}

.header--scrolled .header__inner {
    box-shadow: 0 4px 16px rgba(35, 38, 38, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    .header__inner {
        transition: none;
    }
}

/* Homepage sections rise in once. The hidden state exists only after
   scripts.js adds .js-motion and .home-reveal, and never on the hero. */
html.js-motion .home-reveal {
    opacity: 0;
    transform: translateY(14px);
}

html.js-motion .home-reveal.home-reveal--ready {
    transition: opacity 520ms ease-out, transform 520ms ease-out;
}

html.js-motion .home-reveal.is-shown {
    opacity: 1;
    transform: none;
}

html.js-motion .home-reveal .home-reveal__card {
    opacity: 0;
}

html.js-motion .home-reveal.is-shown .home-reveal__card {
    opacity: 1;
    transition: opacity 520ms ease-out;
    transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    html.js-motion .home-reveal,
    html.js-motion .home-reveal .home-reveal__card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* First-visit cookie notice. Fixed, so it does not move the hero. */
.cookie-banner {
    position: fixed;
    z-index: 90;
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
    max-width: 720px;
    margin-inline: auto;
    pointer-events: none;
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 16px 24px;
    padding: 16px 20px;
    border-radius: var(--radius-medium);
    background-color: var(--color-light-white);
    box-shadow: 0 8px 24px rgba(35, 38, 38, 0.14);
    pointer-events: auto;
}

.cookie-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--color-dark-gray);
}

.cookie-banner__accept {
    flex: 0 0 auto;
    min-height: 44px;
}

@media (max-width: 766px) {
    .cookie-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

.cookie-banner__accept {
    width: 100%;
    }
}

/* Same popup shell as the forms. Column only so the short message is not a second column. */
.popup--success .popup__window {
    flex-direction: column;
    align-items: stretch;
}

.popup--success .popup__heading {
    text-align: center;
}

.popup--success .popup__submit {
    width: auto;
    align-self: center;
    margin-left: 0;
}
