@font-face {
    font-family: 'Jost';
    src: url('/fonts/Jost/Jost-VariableFont_wght.ttf');
}

@font-face {
    font-family: 'Zametka Parletter';
    src: url('/fonts/Zametka_Parletter.otf');
}

@font-face {
    font-family: 'PT Sans';
    src: url('/fonts/PTSans-Bold.ttf');
}

:root {
    --main-bg-color-frames: #afb7c5;
    --main-bg-color-frames-2: #d0d7e2;
    --main-bg-color-buttons: #c7ceda;
    --main-bg-color-buttons-2: #e5ebf5;

    --main-text-color-frames: #1d1e1f;
}

#title {
    color: var(--main-bg-color-frames);
    font-size: clamp(28px, 5vw, 48px);
    margin-bottom: 0px;
    margin-top: 0px;
    font-family: 'Jost';
    border-bottom: 5px solid var(--main-text-color-frames);
    width: 90%;
}


* {
    box-sizing: border-box;

}

body {
    margin: 0;
    padding: 0;
    background: #2f3235;
}

.buttongrid {
    margin-top: 25px;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    direction: row;
}

.ingrid-block {
    font-family: 'Jost';
    padding: clamp(8px, 1vw, 16px);
    color: var(--main-text-color-frames);
    text-align: left;
    background-color: var(--main-bg-color-frames-2);
    border-radius: clamp(8px, 1vw, 16px);
}

.ingrid-buttonlink {
    font-size: clamp(16px, 10vw, 40px);
    color: var(--main-text-color-frames);
}

.ingrid-button1x1 {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 30%;
  min-width: 200px;
  max-width: 30%;
}
.ingrid-button1x2 {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 60%;
  min-width: 200px;
  max-width: 60%;
}
.ingrid-button1x3 {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 100%;
  min-width: 200px;
  max-width: 100%;
}

@media screen and (max-width: 600px) {
    .ingrid-button1x1 {
        min-width: 80%;
    }
    .ingrid-button1x2 {
        min-width: 80%;
    }
    .ingrid-button1x3 {
        min-width: 80%;
    }
}

.title-paragraph {
    margin: 0;
    color: var(--main-text-color-frames);
    font-family: 'Jost';
}

.text-paragraph {
    margin: 0;
    color: var(--main-text-color-frames);
    font-family: 'Jost';
}

#top-bar {
    width: 90%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 10px clamp(15px, 4vw, 80px);

    display: flex;
    align-items: center;

    background-color: #444444;

    border-bottom: 5px solid var(--main-text-color-frames);
    border-bottom-left-radius: clamp(20px, 5vw, 70px);
    border-bottom-right-radius: clamp(20px, 5vw, 70px);

    display: flex;
    align-items: center;
    gap: 15px;
}


#top-bar span {
    margin-left: auto;
    font-size: clamp(20px, 6vw, 60px);
    font-weight: bold;
    color: var(--main-bg-color-frames)
}

#main {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1100px;
    min-height: 150px;

    margin: 15px auto 0;

    background-color: #212325;
    border-radius: clamp(8px, 1vw, 16px);

    padding: clamp(4px, 2vw, 10px);
}
#mainframe {
    width: 68.5%;
    max-width: 1100px;
    min-height: 150px;

    margin: 0px auto 0;

    background-color: var(--main-bg-color-frames);
    border-radius: clamp(8px, 1vw, 16px);

    padding: clamp(10px, 2vw, 40px);
}
#menuframe {
    display: flex;
    flex-direction: column;
    width: 28.5%;
    max-width: 1100px;
    min-height: 450px;

    margin: 0px auto 0;

    background-color: var(--main-bg-color-frames);
    font-family: 'Jost';
    font-weight: 500;
    border-radius: clamp(8px, 1vw, 16px);

    padding: clamp(10px, 2vw, 20px);
}

a {
    /* remove link underlines */
    text-decoration: none;
}

.bottommenu {
    bottom: 0;
    margin-top: auto;
}

.linkzurnummer {
     color: var(--main-text-color-frames);
     text-decoration: underline;
     text-underline-offset: 2px;
}

.menubuttonlink {
    color: var(--main-text-color-frames);
    background-color: var(--main-bg-color-buttons);
    margin: 5px;
    border-radius: 15px;
    min-height: clamp(8px, 4vh, 40px);
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
    transition: background-color 0.2s;
}

.menubuttonlink:hover {
    background-color: var(--main-bg-color-buttons-2);
}

.title {
    margin: 10px;

    font-size: clamp(28px, 5vw, 48px);

    font-family: 'Jost';
}

@media (max-width: 600px) {
    #top-bar {
        width: 100%;
        padding: 10px 15px;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
    }

    #main {
        width: calc(100% - 20px);
        margin-top: 10px;
    }

    .title {
        margin: 5px;
    }
}

/*
    This code was found on: https://stackoverflow.com/questions/62867788/text-underline-animation-in-css-the-simplest-way
    List of all css sources you can find here: https://subhuman.xyz/sources/code/css
*/
.appearunderline {
  background: linear-gradient(currentColor 0 0) 
    bottom center/
    var(--underline-width, 0%) 0.1em
    no-repeat;
  display: inline-block;
  text-decoration: none;
  transition: background-size 0.5s;
}

.appearunderline:hover {
  --underline-width: 100%;
  cursor: help;
}


/* По умолчанию стрелочка скрыта */
#menu-toggle {
    display: none;
}

.sharebuttongrid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap:wrap;
}

.sharebutton {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 30%;
  min-width: 200px;
  max-width: 50%;

  height: 40px;
  border-radius: 15px;
  color: var(--main-text-color-frames);
  border: none;
  font-family: 'Jost';
  font-weight: bolder;
  align-content: center;
  cursor: pointer;
  transition: filter 0.3s ease;
}

.sharebutton:hover {
    filter: brightness(1.1);
}

.sharebutton:active {
    filter: brightness(0.9);
}

@media (max-width: 899px) {
    :root {
        --menu-width: min(260px, calc(100vw - 45px));
    }

    /* Боковое меню */
    #menuframe {
        position: fixed;
        top: 0;
        left: 0;

        width: var(--menu-width);
        height: 100dvh;
        box-sizing: border-box;

        background: #242424;
        z-index: 1000;
        overflow-y: auto;

        /* Прячем меню за левой границей */
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    /* Открытое меню */
    #menuframe.open {
        transform: translateX(0);
    }

    /* Кнопка со стрелочкой */
    #menu-toggle {
        display: block;
        position: fixed;

        left: 0;
        top: 50%;
        transform: translateY(-50%);

        width: 40px;
        height: 65px;

        background: #333;
        color: white;
        border: 2px solid #777;
        border-left: none;
        border-radius: 0 10px 10px 0;

        cursor: pointer;
        z-index: 1001;

        transition: left 0.3s ease;
    }

    /* Стрелочка перемещается вместе с меню */
    #menu-toggle.open {
        left: var(--menu-width);
    }

    /* Контент занимает доступную ширину */
    #mainframe {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}