﻿:root {
    --main: #f4e9d0;
    --accent: #8b0000;
    --second-accent: #d4af37;
}


/* =========================================
   СБРОС
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;


    background: url("foto/norm-prav/norm-prav bg.jpeg") no-repeat center center fixed;
    background-size: cover;

    min-height: 100vh;
}


/* =========================================
   ГЛАВНЫЙ БЛОК
========================================= */

.hero {
    width: 100%;
    font-family: Merriweather, serif;
    /* ВАЖНО:
       больше НЕ ограничиваем hero высотой экрана */
    min-height: calc(100vh - 80px);

    display: block;
}


/* =========================================
   ОСНОВНОЙ КОНТЕНТ
========================================= */

.hero-content {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    display: flex;
    flex-direction: column;

    /* НЕ center по вертикали */
    justify-content: flex-start;

    align-items: center;

    text-align: center;

    padding: 30px 30px 10px;

    border-radius: 12px;

    opacity: 0;

    transform: translateY(40px);

    animation: fadeUp 1s ease forwards;
}


/* =========================================
   ЗАГОЛОВОК
========================================= */

.hero-content h1 {
    position: relative;

    color: var(--second-accent);

    background: var(--accent);

    font-size: 2.5em;

    font-weight: normal;

    line-height: 1.2;

    padding: 14px 40px;

    margin: 0 0 50px;

    display: inline-block;

    text-align: center;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4);

    animation:
        fadeUp 1s ease forwards;

    animation-delay: 0.2s;

    opacity: 0;
}


/* золотая линия */

.hero-content h1::before {
    content: "";

    position: absolute;

    width: 100%;
    height: 4px;

    left: 0;
    bottom: -15px;

    background: var(--second-accent);
}


/* красный треугольник */

.hero-content h1::after {
    content: "";

    position: absolute;

    height: 0;
    width: 80%;

    border-top: 10px solid var(--accent);

    border-left: 12px solid transparent;
    border-right: 12px solid transparent;

    left: 50%;

    transform: translateX(-50%);

    bottom: -25px;
}


/* =========================================
   ТЕКСТ
========================================= */
.peshka {
        background: var(--main);
        padding: 20px;
        border-radius: 15px;

}
.hero-content p {
    width: 100%;
    max-width: 850px;
    font-size: 18px;

    line-height: 1.6;

    margin: 0 0 35px;

    animation:
        fadeUp 1s ease forwards;

    animation-delay: 0.4s;

    opacity: 0;
}


.hero-content a {
    color: black;

    text-decoration: none;
}


.hero-content a:hover {
    color: var(--accent);

    text-decoration: none;
}


.hero-content span {
    color: black;

    font-weight: bold;

    border-bottom:
        1px solid var(--second-accent);
}


/* =========================================
   КНОПКИ
========================================= */

.hero-buttons {
    animation:
        fadeUp 1s ease forwards;

    animation-delay: 0.6s;

    opacity: 0;
}


/* =========================================
   РАЗДЕЛИТЕЛЬ
========================================= */

.divider {
    width: 80px;
    height: 4px;

    background:
        var(--second-accent);

    border-radius: 2px;

    margin: 30px auto;
}


/* =========================================
   МЕНЮ / КАРТОЧКИ
========================================= */

.hero-menu {
    width: 100%;

    max-width: 1200px;

    margin: 20px auto 0;

    padding: 0;

    display: grid;

    /* 4 карточки в ряд */
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 30px;

    align-items: stretch;
}


/* =========================================
   КАРТОЧКА
========================================= */

.hero-menu .portfolio-item {
    width: 100%;

    min-width: 0;

    margin: 0;
}


/* ссылка */

.hero-menu .portfolio-item a {
    display: block;

    width: 100%;
    height: 100%;

    text-decoration: none;

    color: inherit;
}


/* =========================================
   ОСНОВА КАРТОЧКИ
========================================= */

.hero-menu .portfolio-item-wrap {
    position: relative;

    width: 85%;

    height: 400px;

    overflow: hidden;

    background: var(--main);

    border:
        2px solid var(--second-accent);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}


/* =========================================
   ЗАТЕМНЕНИЕ
========================================= */

.hero-menu .portfolio-item-wrap::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(139, 0, 0, 0.75),
            rgba(0, 0, 0, 0.2)
        );

    opacity: 0.6;

    transition:
        opacity 0.3s ease;

    pointer-events: none;
}


/* =========================================
   КАРТИНКА
========================================= */

.hero-menu .portfolio-item img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: 0.9;

    filter:
        sepia(25%)
        contrast(0.95);

    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}


/* =========================================
   ТЕКСТ НА КАРТОЧКЕ
========================================= */

.hero-menu .portfolio-heading {
    position: absolute;

    left: 15px;
    right: 15px;

    bottom: 20px;

    z-index: 2;

    text-align: center;
}


.hero-menu .portfolio-heading h3 {
    font-size: 16px;

    font-weight: normal;

    line-height: 1.3;

    color:
        var(--second-accent);

    background:
        rgba(139, 0, 0, 0.85);

    padding: 10px;

    border:
        1px solid var(--second-accent);
}


/* =========================================
   HOVER
========================================= */

.hero-menu .portfolio-item:hover
.portfolio-item-wrap {

    transform:
        translateY(-5px);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.5);
}


.hero-menu .portfolio-item:hover img {

    transform:
        scale(1.08);

    filter:
        brightness(1.1)
        sepia(10%);
}


.hero-menu .portfolio-item:hover
.portfolio-item-wrap::after {

    opacity: 0.85;
}


/* =========================================
   СЕКЦИЯ
========================================= */

.portfolio-section {

    width: 100%;

    background:
        linear-gradient(
            to bottom,
            #1a1a1a,
            #2b2b2b
        );

    padding:
        80px 20px 120px;
}


.portfolio-title {

    text-align: center;

    font-size: 28px;

    margin-bottom: 40px;

    color:
        var(--second-accent);
}


/* =========================================
   АНИМАЦИЯ
========================================= */

@keyframes fadeUp {

    to {

        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes pulse {

    0% {
        transform:
            translateY(0);
    }

    50% {
        transform:
            translateY(5px);
    }

    100% {
        transform:
            translateY(0);
    }
}


/* =========================================
   АДАПТИВ — ДО 1100px
========================================= */

@media (max-width: 1100px) {

    .hero-menu {

        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 25px;
    }

}


/* =========================================
   АДАПТИВ — ДО 800px
========================================= */

@media (max-width: 800px) {

    .hero-content {

        padding:
            40px 20px 60px;
    }


    .hero-content h1 {

        font-size:
            2em;

        padding:
            12px 25px;
    }


    .hero-menu {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

}


/* =========================================
   ТЕЛЕФОН
========================================= */

@media (max-width: 520px) {

    .hero-content {

        padding:
            30px 15px 50px;
    }


    .hero-content h1 {

        font-size:
            1.5em;

        padding:
            12px 18px;

        margin-bottom:
            40px;
    }


    .hero-content p {

        font-size:
            16px;
    }


    .hero-menu {

        grid-template-columns:
            1fr;

        gap: 20px;
    }


    .hero-menu .portfolio-item-wrap {

        height:
            240px;
    }

}
