/* Modern CSS reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #656565;
    background-color: #777272;
}

/* Main layout containers */
.container {
    width: 100%;
    background-color: #fff;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    margin: 0;
}

.main-content {
    width: 100%;
    background-color: #fff;
}

/* Header */
.header-logo {
    height: 129px;
    background-image: url('images/logo1.png');
    background-repeat: no-repeat;
    background-position: center left;
    width: 100%;
    margin-left: 100px;
    position: relative;
}
.header-logo::after {
    content: "Doctor in the history of science (musical art)";
    position: absolute;
    color: #f8dddd;
    background-color: rgba(204, 0, 0, 1);
    font-family: 'Times New Roman', serif;
    font-size: 18px;
    line-height: 18px;
    position: absolute;
    top: 87px;
    left: 165px;
    padding: 0px 5px;
    /*text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);*/
}

.header-logo::before {
    content: ""; /* Added content property */
    position: absolute;
    top: 0;
    left: -100px;
    height: 129px;
    width: 100px;
    background-image: url('images/left.gif');
    background-repeat: no-repeat;
    background-position: center left;
    background-color: #cc0000;
}

/* Navigation */
.main-nav {
    background-color: #979797;
    color: #FFFFFF;
    padding: 2px 28px 4px;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
    display: block;
}
.main-nav.mobile {
    display: none;
}

.main-nav a {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    line-height: 10px;
    text-transform: uppercase;
    color: #FFFFFF;
    text-decoration: none;
}

.main-nav a:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: #ddd;
    flex-shrink: 0;
    border-right: 1px solid #ccc;
}

.sidebar-nav {
    padding-top: 70px;
}

.sidebar-nav a {
    display: block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    line-height: 10px;
    color: #777272;
    text-decoration: none;
    font-weight: bold;
    text-align: right;
    padding: 9px 20px 9px 0;
}

.sidebar-nav a:hover {
    color: #5F6460;
}

/* Content area */
.content {
    flex: 1;
    padding: 0 20px;
    max-width: 75%;
    background-color: #fff;
}

.welcome-header {
    /*background-color: #CCCC99;*/
    background-color: #E7E7E7;
    padding: 5px 10px;
    margin-bottom: 15px;
    margin-top: 20px;
}

.welcome-header h2 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 12px;
    text-transform: uppercase;
    color: #5F6460;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin: 0;
}

.welcome-header h2::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url('images/tit_i.gif');
    margin-right: 12px;
}

.content-with-image {
    display: flex;
}

.profile-image {
    margin-right: 20px;
    height: 375px;
    width: 250px;
    max-width: 250px;
}

.profile-text {
    flex: 1;
}

.left-column {
    width: 217px;
}

.divider {
    width: 1px;
    background-image: url('images/ln_1.gif');
    margin: 73px 22px 0 0;
}

.right-column {
    flex: 1;
}

/* Contacts page specific styles */
.contacts-columns {
    display: flex;
    width: 100%;
    gap: 30px;
}

.contacts-columns .left-column,
.contacts-columns .right-column {
    flex: 1;
}

.contacts-columns .divider-line {
    width: 100%;
}

/* Section headers */
.section-header {
    background-color: #E7E7E7;
    padding: 7px 10px;
    margin: 21px 0 10px 0;
}

.gallery-item {
    background-color: maroon;
    padding: 10px;
}

.video-header,
.review-header {
    padding: 7px 10px !important;
}

.section-header h2,
.section-header h3,
.video-header h3,
.review-header h3 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 12px;
    text-transform: uppercase;
    color: #5F6460;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.section-header h3::before,
.video-header h3::before,
.review-header h3::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url('images/tit_i.gif');
    margin-right: 12px;
}

/* Content typography */
.text,
.review-content {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 12px;
    line-height: 18px;
    color: #656565;
}

.text strong {
    font-weight: bold;
}

.text p {
    margin-bottom: 1em;
}

/* Divider line */
.divider-line {
    border: none;
    height: 1px;
    background-image: url('images/grey_px.gif');
    margin: 12px 0;
    width: 194px;
}

/* Footer */
.footer {
    background-color: #979797;
    color: #fff;
    padding: 8px 0;
    height: 29px;
    width: 100%;
}

.footer-content {
    background-image: url('images/bgs_3.gif');
    padding-left: 61px;
    padding-bottom: 12px;
}

.footer a {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    line-height: 10px;
    color: #FFFFFF;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Forms */
.form {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 11px;
    line-height: 12px;
    background-color: #FFFFFF;
    height: 18px;
    width: 138px;
    border: 2px solid #363636;
}

.form_1 {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 11px;
    line-height: 12px;
    height: 19px;
    width: 323px;
    border: 1px solid #CCCCCC;
}

.form_2 {
    font-family: Tahoma, Geneva, sans-serif;
    font-size: 11px;
    line-height: 12px;
    height: 121px;
    width: 323px;
    border: 1px solid #CCCCCC;
    overflow: auto;
}

/* Responsive adjustments */
@media (max-width: 868px) {
    .header-logo {
        margin-left: 0;
        background-size: contain;
        background-position: center;
        height: auto;
        min-height: 70px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .header-logo::before {
        display: none;
    }
    .header-logo::after {
        position: absolute;
        top: auto;
        bottom: 10px;
        left: -35px;
        right: 0;
        text-align: center;
        font-size: 11px;
        /*background-color: rgba(204, 0, 0, 0.5);*/
    }

    .content-wrapper {
        flex-direction: column;
    }

    .main-nav {
        display: none;
    }

    .main-nav.mobile {
        display: block;
        padding-top: 5px;
        padding-bottom: 15px;
        padding-left: 0;
    }

    .main-nav a {
        white-space: nowrap;
        display: block;
        position: relative;
        margin-top: 15px;
        margin-bottom: 5px;
    }

    .contacts-columns {
        flex-direction: column;
    }

    .sidebar {
        /*width: 100%;*/
        display: none;
    }

    .sidebar-nav {
        padding: 20px 0;
    }

    .sidebar-nav a {
        text-align: center;
    }

    .content {
        max-width: 100%;
        padding: 0 15px;
    }

    .content-with-image {
        flex-direction: column;
    }

    .profile-image {
        margin: 0 auto 20px;
    }

    .left-column, .right-column {
        width: 100%;
    }

    .divider {
        width: 100%;
        height: 1px;
        margin: 20px 0;
    }
    .gallery-item {
        width: 100% !important;
    }
}

@media (max-width: 405px) {
    .header-logo::after {
        /*position: absolute;*/
        /*top: auto;*/
        /*bottom: 10px;*/
        left: -30px;
        /*right: 0;*/
        /*text-align: center;*/
        /*font-size: 11px;*/
        /*background-color: rgba(204, 0, 0, 0.5);*/
    }
}

@media (max-width: 393px) {
    .header-logo::after {
        left: -22px;
    }
}
@media (max-width: 393px) {
    .header-logo::after {
        left: -22px;
    }
}

@media (max-width: 375px) {
    .header-logo::after {
        left: -30px;
        font-size: 10px;
    }
}


@media (max-width: 360px) {
    .header-logo::after {
        left: -38px;
        font-size: 9px;
    }
}
