@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Serif|Roboto&subset=cyrillic,cyrillic-ext');

body {
    padding: 0;
    margin: 0;
    background: #FFFFFF; /* Changed to white from #f4f4f4 */
}

html, h1, h2, h3, h4, h5, h6 {
    font-family: 'IBM Plex Serif', serif;
}

html, a {
    font-family: 'Roboto', sans-serif;
}

.navbar {
    background: #007241; /* Dark green */
}

.nav-link, .navbar-brand {
    color: #FFFFFF; /* Pure white for better contrast */
    cursor: pointer;
}

.nav-link {
    margin-right: 1em !important;
}

.nav-link:hover {
    background: #FFFFFF; /* White background on hover */
    color: #007241; /* Dark green text for contrast */
}

.nav-flink, .navbar-brand {
    color: #FFFFFF;
    cursor: pointer;
}

.nav-flink {
    margin-right: 1em !important;
}

.nav-flink:hover {
    background: #FFFFFF;
    color: #007241; /* Changed from #FFFF00 to #007241 for contrast (ratio ~4.7:1) */
}

.navbar-collapse {
    justify-content: flex-end;
}

.navbar-toggler {
    background: #FFFFFF !important;
}

/* Header style */
.header {
    position: relative;
    background: url('../images/headerback.jpg') no-repeat center center;
    background-size: cover;
    height: 250px; /* Fixed height from previous fix */
    display: flex;
    align-items: center;
}

.overlay {
    position: absolute;
    min-height: 100%;
    min-width: 100%;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.5); /* Changed to darker overlay for better text contrast */
}

.description {
    position: relative;
    z-index: 1;
    margin: auto;
    padding: 2em;
    text-align: center;
}

.description h1 {
    color: #FFFFFF; /* White for contrast on dark overlay (ratio ~21:1) */
}

.description p {
    color: #FFFFFF; /* White instead of #666 for better contrast */
    font-size: 18px; /* Slightly smaller for compactness */
    width: 50%;
    margin: 0 auto;
    line-height: 1.5;
}

.description button {
    border: 1px solid #007241;
    background: #007241; /* Consistent with primary color */
    color: #FFFFFF; /* White text (ratio ~4.7:1) */
}

/* About */
.about {
    margin: 4em 0;
    padding: 1em;
    position: relative;
    background: #FFFFFF; /* White background */
}

.about h1, .about .desc h3 {
    color: #007241; /* Dark green for headings */
}

.about img {
    height: 100%;
    width: 100%;
    border-radius: 50%;
}

.about span {
    display: block;
    color: #007241;
    position: absolute;
    left: 115px;
}

.about .desc {
    padding: 2em;
    border-left: 4px solid #007241; /* Changed to #007241 for consistency */
}

.about .desc p {
    line-height: 2;
    color: #333333; /* Darker gray for better readability (ratio ~13:1 on #FFFFFF) */
}

/* Portfolio */
.portfolio {
    margin: 4em 0;
    position: relative;
    background: #FFFFFF;
}

.portfolio h1 {
    color: #007241;
    margin: 2em;
}

.portfolio img {
    height: 15rem;
    width: 100%;
    margin: 1em;
}

/* Blog */
.blog {
    margin: 4em 0;
    position: relative;
    background: #FFFFFF;
}

.blog h1 {
    color: #007241;
    margin: 2em;
}

.blog .card {
    box-shadow: 0 0 20px #cccccc;
    background: #FFFFFF;
}

.blog .card img {
    width: 100%;
    height: 12em;
}

.blog .card-title {
    color: #007241;
}

.blog .card-body {
    padding: 1em;
}

/* Team */
.team {
    margin: 4em 0;
    position: relative;
    background: #FFFFFF;
}

.team h1 {
    color: #007241;
    margin: 2em;
}

.team .item {
    position: relative;
    overflow: hidden;
}

.team .des {
    background: #007241;
    color: #FFFFFF; /* White text on dark green (ratio ~4.7:1) */
    text-align: center;
    border-top-right-radius: 93%;
    transition: .3s ease-in-out;
    position: absolute;
    width: 88%;
    bottom: 24px;
}

.team .item:hover .des {
    height: 100%;
    background: rgba(0, 114, 65, 0.9); /* Slightly transparent dark green */
    position: absolute;
    width: 89%;
    padding: 5em;
    top: 0;
    border-top-right-radius: 0;
}

/* Contact Form */
.contact-form {
    margin: 6em 0;
    position: relative;
    background: #FFFFFF;
}

.contact-form h1 {
    padding: 2em 1px;
    color: #007241;
}

.contact-form .right {
    max-width: 600px;
}

.contact-form .right .btn-secondary {
    background: #007241;
    color: #FFFFFF;
    border: 0;
}

.contact-form .right .form-control::placeholder {
    color: #333333; /* Darker gray for better contrast (ratio ~13:1 on #FFFFFF) */
    font-size: 16px;
}

@media (max-width: 400px) {
    #copyright {
        text-align: center;
    }
    #social > div {
        display: block;
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }
}

img {
    max-width: 100%; /* Fixed from max-width: auto */
    height: auto; /* Fixed from height: 100% */
    display: block;
}