:root {
    --dark-bg: #303030;
    --pin-bg: #454545;
    --bone-main: #fff;
    --bronze-accent: #C7BDA8;
    --pink-accent: #eb5757;
    --font: 'Space Grotesk', 'sans-serif';
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    line-height: 1.7;
    color: #222;
    background: #faf7f7;
}

/* Header */
.site-header {
    background: var(--dark-bg);
    padding: 0;
    max-height: 100px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    z-index: 2000;
    position: relative;
}

.logos{
    display: flex;
    flex-direction: row;
    margin-right: auto;
}

.logo-stack {
    padding: 25px 5px 5px 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#mhp_header_logo {
    max-height: 40px;
}

#MKiDN_header_logo{
    max-height: 40px;
}

.header-container {
    padding-right: 40px;
    display: flex;
    align-items: center;
}

.site-branding {
    max-height: 60px;
    display: flex;
}


.site-subtitle {
    font-size: 0.8rem;
    color: #776355;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 1vw;
}

.main-nav a {
    color: var(--bone-main);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 0;
    transition: color 0.2s;
    position: relative;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.main-nav a:hover {
    color: var(--bronze-accent);
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #303030;
    transition: width 0.2s;
}

.main-nav a:hover::after {
    width: 100%;
}

.user-info {
    color: var(--bronze-accent);
    font-weight: bold;
    font-size: 0.85rem;
    padding-left: 15px;
    border-left: 1px solid #e6e6e6;
    align-content: center;
}

/* Messages */
.messages-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 30px;
}

.message {
    padding: 15px 25px;
    border-radius: 2px;
    margin-bottom: 12px;
    border-left: 3px solid;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.message.success {
    background: #f3f3f3;
    border-left-color: #776355;
    color: #303030;
}

.message.error {
    background: #faf7f7;
    border-left-color: #a79076;
    color: #303030;
}

.message.info {
    background: #f3f3f3;
    border-left-color: #00b2ff;
    color: #303030;
}

/* Forms */
.form-container {
    max-width: 720px;
    margin: 50px auto;
    padding: 0 30px;
}

.form-card {
    background: #fff;
    padding: 45px 40px;
    border-radius: 2px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.form-card h2 {
    margin-bottom: 30px;
    color: #303030;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.form-card form p {
    margin-bottom: 24px;
}

.form-card label {
    display: block;
    margin-bottom: 8px;
    color: #222;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="password"],
.form-card input[type="date"],
.form-card input[type="number"],
.form-card input[type="file"],
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    background: #faf7f7;
    transition: all 0.2s;
}

.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    outline: none;
    border-color: #776355;
    background: #fff;
}

.form-card textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.btn {
    display: inline-block;
    padding: 13px 28px;
    background: #303030;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    text-align: center;
    text-transform: uppercase;
}

.btn:hover {
    background: #000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.btn-secondary {
    background: #fff;
    color: #303030;
    border: 1px solid #303030;
}

.btn-secondary:hover {
    background: #f2f2f2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
}

.errorlist {
    list-style: none;
    color: #a79076;
    font-size: 0.85rem;
    margin: 6px 0 0 0;
    font-weight: 500;
}

.helptext {
    font-size: 0.82rem;
    color: #776355;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

/* Links */
.form-links {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e6e6e6;
}

.form-links a {
    color: #303030;
    text-decoration: none;
    border-bottom: 1px solid #303030;
    transition: color 0.2s;
}

.form-links a:hover {
    color: #000;
    border-bottom-color: #000;
}

.leaflet-bottom.leaflet-right > .leaflet-control-attribution {
    right: -210px;
    bottom: -35px;
}
.leaflet-bottom.leaflet-right > .leaflet-control-attribution:hover {
    right: 0;
    bottom: 0;
}
.leaflet-bottom.leaflet-right > .leaflet-control-attribution::before {
    content: "©";
    display: block;
    font-size: large;
}
.leaflet-bottom.leaflet-right > .leaflet-control-attribution:hover::before {
    content: "";
}

/* Pin Popup */

.leaflet-popup-close-button span{
    color: var(--bone-main);
}

.leaflet-popup-content .popup-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: block;
    line-height: 1.3;
    text-align: center;
}


.leaflet-popup-content img {
    max-width: 100%;
    height: auto;
    align-self: center;
    margin: 10px;
}

.leaflet-popup-content{
    max-height: 400px; 
    margin: 25px 0px 25px 25px;
    display: flex;
    overflow-x: scroll;
    overflow-x: hidden;
}

.leaflet-popup-content-wrapper {
    font-family: var(--font);
    background-color: var(--pin-bg);
    color: var(--bone-main);

}

.popup-container{
    margin-right: 25px;
    color: var(--bone-main);
    gap: 10px;
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    line-height: 1.2rem;

}

/* Responsive */
@media (max-width: 850px) {
    .site-header {
        max-height: 150px;
        min-height: 120px;
    }

    .header-container {
        flex-direction: column;
        padding: 0;
    }

    .logos{
        /* flex-direction: column; */
        display: flex;
        align-items: center;
        margin: auto;
        padding: auto;
        margin:auto
    }

    .logo-stack {
        padding-right: 0px;
        padding-left: 0px;
    }

    .main-nav {
        padding-top: 0px;
    }

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

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .user-info {
        display: none;
    }

    #site-title {
        padding-left: 0px;
    }

    .form-card {
        padding: 35px 25px;
    }

    .form-container {
        padding: 0 20px;
    }

    .user-info {
        border-left: none;
        padding-left: 0;
    }
}

@media (max-width: 420px) {
    .site-header a {
        font-size: 3vw;
    }
    .site-header span {
        font-size: 3vw;
    }
    .site-header img {
        max-width: 35vw;
    }
    #search-expand-btn svg {
        display: none;
    }
}