﻿@font-face {
    font-family: "OpenSans";
    src: url("OpenSans-Regular.ttf");
}

* {
    box-sizing: border-box;
}

html, body {
    padding: 0px;
    margin: 0px;
    font-family: "OpenSans";
    background-color: white;
    font-size: 14px;
    color: #333333;
}


p {
    line-height: 1.5;
}


a {
    color: #333333;
    text-decoration: none;
}


input[type="text"],
select {
    border-radius: 4px;
    padding: 7px 10px;
    border: 1px solid #afafaf;
    outline: none;
    background-image: linear-gradient(to top, #f1f1f1, #ffffff 20%, #ffffff 80%, #f1f1f1);
}

button {
    border-radius: 2px;
    padding: 7px 10px;
    border: 1px solid #afafaf;
    font-size: 1em;
    background-image: linear-gradient(to top, #e4e4e4, #f7f7f7);
    cursor: pointer;
    font-weight: bold;
    color: #555;
}

textarea {
    background-image: linear-gradient(to top, #f1f1f1, #ffffff 5%, #ffffff 95%, #f1f1f1);
}

a:hover {
    color: red;
    text-decoration: underline;
}

::placeholder {
    color: silver;
    font-weight: normal;
}

.external-link {
    color: forestgreen;
    font-weight: bold;
}

/* CONTAINER */



.container {
    max-width: 1366px;
    min-width: 1260px;
    padding-left: 5px;
    padding-right: 5px;
    margin: auto;
    background-color: white;
}





/* HEADER */

.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: 120px;
    border-bottom: 2px solid #f1f1f1;
}

.header__logo {
    font-size: 3em;
    color: #444;
    font-weight: bold;
}

    .header__logo > a:hover {
        text-decoration: none;
        color: #333;
    }


.header__search {
    width: 100%;
    text-align: right;
}

.header__menu {
    margin-left: auto;
}





/* MENU */

#btnMenu {
    display: none;
}

.menu {
    display: flex;
    align-items: right;
    border-radius: 4px;
}

.menu__item {
    font-size: 1.2em;
    text-decoration: none;
    color: #777;
    font-weight: bold;
    margin-left: 0px;
    padding: 15px 20px;
    border-right: 0px;
}

    .menu__item:hover {
        color: black;
    }

.menu__item_push {
    margin-left: auto;
}

.menu__item_add {
    background-color: yellow;
    color: black;
    border: 5px;
    padding: 10px 20px;
    transition: all 0.5s ease 0s;
}


/* CARD */

.card {
    border: 2px solid #f1f1f1;
    border-radius: 2px;
    margin-bottom: 20px;
}

.card__header {
    background-color: #f1f1f1;
    background-image: linear-gradient(#f1f1f1, #ffffff);
    padding: 10px;
    padding-bottom: 20px;
    text-align: left;
    font-weight: bold;
    color: #333;
}

.card__body {
    padding: 10px;
}



/* MAIN PAGE */

.main {
    display: flex;
}

.main__left {
    width: 17%;
    margin-top: 30px;
    margin-right: 20px;
}

.main__center {
    width: 66%;
    margin-top: 30px;
}

.main__right {
    margin-top: 30px;
    width: 17%;
    margin-left: 20px;
}

.main-categories {
    display: flex;
    flex-wrap: wrap;
}

.main-category {
    display: flex;
    width: 33%;
    margin-right: 0.5%;
    margin-bottom: 30px;
    border: 0px solid silver;
}

    .main-category:nth-child(3n) {
        margin-right: 0%;
    }

.main-category__img {
    height: 42px;
    width: 42px;
    margin-right: 10px;
}

.main-category__header {
    display: flex;
    justify-content: left;
    align-items: center;
    font-weight: normal;
    text-transform: uppercase;
    font-weight: bold;
    line-height: 1.7;
}

.main-category__header-link {
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dotted #333;
}

    .main-category__header-link:hover {
        text-decoration: none;
        border-bottom-color: red;
    }

.main-category__header-count {
    margin-left: 7px;
    color: #777;
    font-size: 0.9em;
}

.main-category__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    justify-content: left;
    padding: 0px;
    font-size: 1em;
    font-weight: normal;
    line-height: 1.8;
    transition: margin-left 0.5s, color 0.5s;
    background-repeat: no-repeat;
}

    .main-category__item:hover {
        margin-left: 0px;
        color: #FF0000;
        text-decoration: underline;
    }

.main-category__count {
    color: #777;
}

.main-sites {
    margin-bottom: 50px;
}

.main-site {
    display: flex;
    padding: 10px;
    margin-bottom: 5px;
    border-bottom: 1px dotted #ccc;
}

    .main-site:hover {
        background-color: #FAFAFA;
    }

.main-site__date {
    margin-right: 12px;
}

.main-site__external-link-wrap {
    margin-right: 10px;
}

.main-site__external-link {
    color: forestgreen;
}

.main-site__internal-link-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* CATEGORY PAGE */

.subcats{
    display: flex;
    flex-flow: row wrap;
    border-top: 2px solid #f1f1f1;
    border-bottom: 2px solid #f1f1f1;
    margin-left: -10px;
    margin-right: -10px;
    padding: 20px 10px;
}

.subcats > a {
    width: 25%;
    display: block;
    font-size: 1.1em;
    margin-bottom: 5px;
    padding: 5px 0px;
    font-weight: bold;
    text-decoration: none;
}


.breadcrumbs {
    text-align: left;
    margin-bottom: 20px;
}

.breadcrumbs > a {
    font-weight: bold;
    color: #555;
}

/* SITE BLOCK */

.site {
    border-bottom: 2px solid #f1f1f1;
    padding: 20px 10px;
    margin-left: -10px;
    margin-right: -10px;
}

    .site:nth-child(2) {
        border-top: 2px solid #f1f1f1;
    }

.site__title-link {
    color: #000;
}

.site__bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.site__external-link {
    color: #080;
    font-weight: bold;
}

.site__internal-link {
    font-weight: bold;
    color: #555;
}

/* SEARCH BLOCK */

.search-side__input {
    display: block;
    font-size: 14px;
    width: 100%;
    background-color: white;
    border: 1px solid #AFAFAF;
    border-radius: 4px;
    padding: 5px 7px;
    outline: none;
    box-sizing: border-box;
    font-weight: bold;
    color: black;
}

.search-side__btn {
    margin: 10px auto 0px auto;
    background-image: linear-gradient(to top, #e4e4e4, #f7f7f7);
    border: 1px solid #afafaf;
    border-radius: 2px;
    display: block;
    width: 50%;
    padding: 5px 10px;
    color: #555;
    outline: none;
    cursor: pointer;
    transition: all 0.5s ease 0s;
    font-size: 14px;
    font-weight: bold;
}

    .search-side__btn:hover {
        background-image: linear-gradient(to bottom, #e4e4e4, #f7f7f7);
        border: 1px solid gray;
        color: #000;
    }



/* NEW SITES BLOCK */

.new-sites__link {
    display: block;
    margin-bottom: 15px;
    white-space: nowrap;
}

/* SEARCH PAGE */

.search-form {
    display: flex;
    width: 600px;
    margin: 0px auto;
    padding-bottom: 20px;
}

.search-form__input-text-query {
    display: block;
    font-size: 14px;
    width: 75%;
    background-color: white;
    border: 1px solid #AFAFAF;
    border-right: 0px;
    border-radius: 4px 0px 0px 4px;
    padding: 7px 10px;
    outline: none;
    box-sizing: border-box;
    font-weight: bold;
    color: black;
}

.search-form__button-submit {
    width: 25%;
}

.search-content {
    width: 600px;
    margin: 0px auto;
}


/* ADD PAGE  */

.add-form {
    background: white;
    margin: 20px auto;
}

.add-form__body {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.add-form__categories {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.add-form__left-side {
    width: 50%;
}

.add-form__right-side {
    width: 50%;
}

.add-form__container {
    padding: 20px;
}


.add-form__input-container {
    margin-bottom: 20px;
}

.add-form__label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #000;
    font-weight: bold;
}

.add-form__input-text {
    display: block;
    width: 100%;
    background-color: white;
    border: 1px solid #afafaf;
    border-radius: 4px;
    padding: 7px 10px;
    outline: none;
    box-sizing: border-box;
    color: black;
    font-weight: normal;
    transition: all 0.5s ease 0s;
}

    .add-form__input-text:focus {
        background-image: linear-gradient(to top, #ffffff, #ffffff);
        border-color: #000;
    }

.add-form__select {
    display: block;
    width: 100%;
    background-color: white;
    border: 1px solid #afafaf;
    border-radius: 4px;
    padding: 7px;
    outline: none;
    margin-bottom: 5px;
    font-weight: bold;
    color: black;
}

    .add-form__select:focus {
        background-image: linear-gradient(to top, #ffffff, #ffffff);
    }


.add-form__textarea {
    display: block;
    font-size: 14px;
    background-color: white;
    width: 100%;
    padding: 7px;
    height: calc(100% - 43px);
    border: 1px solid #afafaf;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    font-weight: normal;
    color: #440;
    transition: all 0.5s ease 0s;
}

    .add-form__textarea:focus {
        background-image: linear-gradient(to top, #ffffff, #ffffff);
    }

.add-form__label_error {
    color: red;
}

.add-form__input-text_error,
.add-form__textarea_error {
    border: 1px solid red;
    color: red;
}

.add-form__error-text {
    font-size: 12px;
    color: red;
}



/* PAGINATION  BLOCK */

.pagination {
    margin: 20px;
    text-align: center;
}
.pagination > span,
.pagination > a {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #f1f1f1;
    border-radius: 2px;
    font-weight: bold;
    cursor: pointer;
}

.pagination > span,
.pagination > a:hover {
    color: black;
    background-color: #f1f1f1;
}


/* FOOTER BLOCK */

.footer {
    border-top: 2px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 150px;
}

.footer__left {
    padding-left: 20px;
    width: 33%;
    text-align: left;
}

.footer__center {
    text-align: center;
    width: 33%;
}

.footer__right {
    width: 33%;
    text-align: right;
    padding-right: 20px;
}





/* ALERTS */

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px dotted #f5c6cb;
    padding: 20px 30px;
}

.alert-warning {
    background-color: #fff3cd;
    padding: 30px 10px;
    color: #856404;
    border: 1px dotted gold;
    margin-bottom: 30px;
    text-align: center;
}

.alert-success {
    color: black;
    background-color: #f0ffd9;
    border: 1px dotted greenyellow;
    padding: 20px 30px;
    border-radius: 6px;
}


.page-title {
    border-bottom: 2px solid dodgerblue;
    padding: 20px 0px
}

.h3-line {
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.h-line {
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.btn {
    background-image: linear-gradient(to top, #e4e4e4, #f7f7f7);
    border: 1px solid #afafaf;
    display: inline-block;
    padding: 10px 30px;
    font-weight: bold;
    color: #333;
    outline: none;
    cursor: pointer;
    transition: all 0.5s ease 0s;
    font-size: 16px;
}

    .btn:hover {
        background-image: linear-gradient(to bottom, #e4e4e4, #f7f7f7);
        border: 1px solid gray;
        color: #000;
    }








/* ADD FORM */

.text-center {
    text-align: center;
}
