$background_color: #242424;
$color: #a6a6a6;
$color_visited: gray;
$color_hover: #dfdfdf;
$color_active: #a6a6a6;

$div_background_color: #1038a7;

$title_font_family: Roboto;
$title_font_size: 21pt;

$regular_font_family: Lato;
$regular_font_size: 12pt;
$regular_image_font_size: 10.5pt;

$foot_font_size: 9.8pt;

body {
    background-color: $background_color;
    color: $color;
}

@font-face {
    font-family: 'Roboto';
    src: url("../images/Roboto-Regular.ttf");
}

@font-face {
    font-family: 'Lato';
    src: url("../images/Lato-Regular.ttf");
}

.global_segment {
    margin-left: auto;
    margin-right: auto;
    max-width: 21cm;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;

    a:link {
        color: $background_color;
    }

    a:visited {
        color: $color_visited;
    }

    a:hover {
        color: $color_hover;
    }

    a:active {
        color: $color_active;
    }

    ul {
        margin-bottom: 0;
        list-style-type: none;
    }

    li {
        padding-top: 15px;
    }

    .title_bar {
        margin-top: 20px;
        width: 80%;
        float: left;
        text-align: left;
        font-family: $title_font_family;
        font-size: 24pt;
    }

    .language_bar {
        margin-top: 20px;
        width: 20%;
        float: left;
        text-align: right;
        font-size: 24pt;
    }

    .segment_general {
        float: left;
        margin-top: 30px;
        width: 100%;
        position: relative;

        .segment_image {
            float: left;
            width: 210px;
            height:250px;
            color: $color;
            font-weight: bold;
            background-color: $div_background_color;
        }

        .cover {
            object-fit: cover;
            object-position: top;
        }

        .foot_content {
            font-size: $foot_font_size;
        }

        .segment_content_image {
            float: right;
            padding: 15px;
            width: 180px;
            height:220px;
            color: $color;
            font-size: $regular_image_font_size;
            font-family: $regular_font_family;
            font-weight: bold;
            background-color: $div_background_color;

            .segment_image_item {
                margin-top: 5px;
            }
        }
    }

    .mini_work_image {
        width: 40px;
        height: 40px;
        float: left;
        margin-right: 10px;
        display: flex;
        justify-content: center;
        align-items: center;

        img {
            max-height: 100%;
            max-width: 100%;
            object-position: center;
        }
    }

    .segment_title {
        float: left;
        width: 250px;
        padding-top: 12px;
        height: 45px;
        color: $color;
        font-family: $title_font_family;
        font-size: $title_font_size;
        text-align: center;
        background-color: $div_background_color;
    }

    .segment_content_normal {
        float: left;
        width: 100%;
        font-family: $regular_font_family;
        font-size: $regular_font_size;
        text-align: justify;
        margin-top: 15px;

        ul {
            margin-top: 0;
            margin-bottom: 0;
            list-style-type: none;
        }

        ul li::before {
            content: ">> ";
            color: $div_background_color;
            font-weight: bold;
            display: inline-block;
            width: 2em;
            margin-left: -2em;
        }

        .segment_content_title {
            margin-top: 9px;
            margin-bottom: 9px;
        }
    }

    .segment_content_work {
        float: left;
        width: 100%;
        font-family: $regular_font_family;
        font-size: 10pt;
        text-align: justify;

        ul {
            margin-top: 0;
            margin-bottom: 0;
            list-style-type: none;
            margin-left: 18px;
            padding-bottom: 10px;
        }

        ul li {
            padding-top: 8px;
        }

        ul li::before {
            content: "+ >";
            color: inherit;
            background-color: $background_color;
            font-weight: bold;
            display: inline-block;
            width: 2em;
            margin-left: -3.4em;
        }


        .segment_content_title {
            margin-top: 9px;
            margin-bottom: 9px;
        }
    }

    .segment_header_middle {
        position: absolute;
        bottom: 0;
        left: 220px;
        right: 220px;
    }

    .segment_title_image {
        float: none;
        margin-left: -40px;
    }

    .segment_description {
        clear: both;
        font-family: $regular_font_family;
        font-size: 10pt;
        font-style: italic;
        color: darken($color, 15%);
        text-align: justify;
        margin: 4px 0 10px 18px;
    }

    .segment_description_general {
        clear: none;
        float: none;
        width: auto;
        overflow: visible;
        margin: 8px 0 0 0;
        padding: 0;
        font-size: 9.5pt;
        text-align: justify;
    }


    .subitem {
        margin-left: 15px;
    }
}

.foot {
    float: left;
    width: 100%;
    height: 30px;
}

.captcha-container {
  float: right;
  
  .captcha-form {
    background-color: $div_background_color;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 210px;
    height: 250px;
    padding: 0 10px;
    box-sizing: border-box;

    p {
        text-align: center;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    form {
      width: 100%;
      margin-top: 15px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    a {
      color: $color;
      cursor: pointer;
      padding-top: 20px;
      padding-bottom: 5px;
      padding-left: 35px;
      padding-right: 35px;
    }
    
    .captcha-input {
      width: 100%;
      padding: 8px;
      margin-bottom: 10px;
      border: 1px solid $color;
      background-color: $background_color;
      color: $color;
      font-size: 9pt;
      box-sizing: border-box;
    }
    
    .captcha-button {
      width: 100%;
      padding: 8px;
      background-color: $background_color;
      color: $color;
      border: 1px solid $color;
      box-sizing: border-box;
      cursor: pointer;
      font-size: 9pt;
      
      &:hover {
        background-color: darken($background_color, 5%);
      }
    }
    
    canvas {
      max-width: 100%;
      height: auto !important;
    }

    .error-message {
      color: #ff4444;
      margin-top: 10px;
      font-size: 14px;
      text-align: center;
    }
  }
}

@media (max-width: 768px) {
    .global_segment {
        padding: 0 10px;

        .title_bar {
            font-size: 18pt;
            width: 75%;
        }

        .language_bar {
            width: 25%;
            font-size: 18pt;
        }

        .segment_general {
            .segment_image {
                width: 140px;
                height: 170px;
            }

            .segment_content_image {
                width: 120px;
                height: 150px;
                padding: 10px;
                font-size: 6pt;
            }

            .segment_header_middle {
                left: 140px;
                right: 150px;
            }

            .segment_title_image {
                margin-left: -20px;
                padding-top: 12.5px;
                padding-bottom: 7.5px;
                height: 30px;
            }

            .segment_description_general {
                font-size: 8pt;
            }
        }

        .segment_title {
            width: 200px;
            font-size: 16pt;
            padding-top: 12.5px;
            padding-bottom: 7.5px;
            height: 30px;
        }

        .mini_work_image {
            width: 32px;
            height: 40px;
            margin-right: 8px;
        }

        .segment_content_list_image {
            margin-left: 3px;
        }

        .segment_content_work {
            font-size: 9pt;

            .segment_content_title {
                margin-top: 12px;
                margin-bottom: 12px;
            }

            ul li::before {
                margin-left: -3.75em;
            }
        }

        .segment_description {
            font-size: 8.5pt;
            margin: 6px 0 6px 14px;
        }
    }

    .captcha-container .captcha-form {
        width: 140px;
        height: 170px;
        font-size: 8pt;
        padding: 0 8px;

        p {
            margin-top: 8px;
            margin-bottom: 8px;
            font-size: 8pt;
        }

        form {
            margin-top: 8px;
        }

        .captcha-input {
            margin-bottom: 8px;
        }

        .captcha-input, .captcha-button {
            padding: 5px;
            font-size: 7pt;
        }
    }
}

@media (max-width: 500px) {
    .global_segment {
        .title_bar {
            font-size: 15pt;
        }

        .language_bar {
            font-size: 15pt;
        }

        .segment_general {
            .segment_image {
                width: 100px;
                height: 125px;
            }

            .segment_content_image {
                width: 90px;
                height: 110px;
                padding: 8px;
                font-size: 4pt;
            }

            .segment_header_middle {
                left: 95px;
                right: 108px;
            }

            .segment_title_image {
                margin-left: -10px;
                padding-top: 10px;
                padding-bottom: 0px;
                height: 33px;
            }

            .segment_description_general {
                font-size: 6.5pt;
                margin: 6px 6px 6px 14px;
            }
        }

        .segment_title {
            width: 160px;
            font-size: 13pt;
            padding-top: 10px;
            padding-bottom: 0px;
            height: 33px;
        }

        .mini_work_image {
            width: 26px;
            height: 40px;
            margin-right: 6px;
        }

        .segment_content_list_image {
            margin-left: 6px;
        }

        .segment_content_work {
            font-size: 8pt;

            ul {
                margin-left: 18px;
            }

            ul li {
                padding-top: 5px;
            }

            ul li::before {
                margin-left: -4.25em;
            }
        }

        .segment_description {
            font-size: 7.5pt;
            margin: 6px 0 6px 14px;
        }

        .captcha-container .captcha-form {
            width: 100px;
            height: 125px;
            font-size: 7pt;
            padding: 0 6px;

            p {
                margin-top: 5px;
                margin-bottom: 5px;
                font-size: 6.25pt;
            }

            a {
                padding-left: 22px;
                padding-right: 22px;
                font-size: 6pt;
            }

            form {
                margin-top: 2px;
            }

            .captcha-input {
                margin-bottom: 2px;
            }

            .captcha-input, .captcha-button {
                padding: 4px;
                font-size: 6pt;
            }
        }
    }
}

@media (max-width: 415px) {
    .global_segment {
        padding: 0 6px;

        .title_bar {
            font-size: 11pt;
        }

        .language_bar {
            font-size: 11pt;
        }

        .segment_general {
            .segment_image {
                width: 80px;
                height: 100px;
            }

            .segment_content_image {
                width: 75px;
                height: 95px;
                padding: 6px;
                font-size: 3.5pt;
            }

            .segment_header_middle {
                left: 75px;
                right: 90px;
            }

            .segment_title_image {
                margin-left: -8px;
                height: 26px;
                font-size: 10pt;
            }

            .segment_description_general {
                font-size: 4.5pt;
                margin: 4px 4px 4px 10px;
            }
        }

        .segment_title {
            width: 130px;
            font-size: 10pt;
            height: 28px;
        }

        .mini_work_image {
            width: 20px;
            height: 27px;
            margin-right: 5px;
        }

        .segment_content_list_image {
            margin-left: 9px;
        }

        .segment_content_work {
            font-size: 5pt;

            .segment_content_title {
                height: 17px;
                margin-top: 9px;
                margin-bottom: 5px;
                font-size: 6pt;
            }

            ul {
                margin-left: 18px;
            }

            ul li {
                padding-top: 4px;
            }

            ul li::before {
                margin-left: -6.5em;
            }
        }

        .segment_description {
            font-size: 4.5pt;
            margin: 4px 0 4px 10px;
        }

        .captcha-container .captcha-form {
            width: 85px;
            height: 105px;
            font-size: 3.5pt;
            padding: 0 5px;

            p {
                margin-top: 4px;
                margin-bottom: 4px;
                font-size: 6pt;
            }

            a {
                padding-left: 20px;
                padding-right: 20px;
                font-size: 5pt;
            }

            form {
                margin-top: 2px;
            }

            .captcha-input {
                margin-bottom: 2px;
            }

            .captcha-input, .captcha-button {
                padding: 3px;
                font-size: 5pt;
            }
        }
    }
}