/* Tripartite Theme - tpl */
/* Based on ML2 theme structure */

/* Custom semantic elements */
brand { font-size: 1.25rem; font-weight: 600; }
brand>a { text-decoration: none; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; color: inherit; }
brand>a:hover { color: inherit; }
brand>a>logo {
    display: block;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-top: -12px;
    margin-bottom: -28px;
    margin-right: 0.15em;
    align-self: center;
    background-image: url('/Assets/img/tripartite-logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
}
brand>a>.brand-logo {
    display: block;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin-top: -6px;
    margin-bottom: -12px;
    margin-right: 0.4em;
    align-self: center;
    object-fit: contain;
}
brand>a>n {
    font-size: 1.6em;
    font-weight: 700;
    color: black !important;
    white-space: nowrap;
    line-height: 1;
}
brand>a>span {
    width: 100%;
    font-size: 0.55em;
    color: #555 !important;
    white-space: nowrap;
    padding-left: 0;
    margin-top: -2px;
}

menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
menu>a { margin-left: 1em; text-decoration: none; color: black; }
menu>a:hover { text-decoration: underline; }
body>header a.cta { padding: 0.15rem 0.75rem; white-space: nowrap; font-size: 0.85rem; line-height: 1.2; margin-bottom: 0; }
body>header a.button { padding: 0.15rem 0.75rem; font-size: 0.85rem; line-height: 1.2; margin-bottom: 0; }

container { display: block; max-width: 1024px; margin: 0 auto; padding: 0 1rem; }
toolbar { display: block; padding: 1rem 0; }
notifications, breadcrumbs, columns { display: block; }

:root {
    --btn-cta-color: #2e6b4f; /* deep forest green */
    --btn-cta-hover: #3d8b68;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body::before {
    background-image: url('/Assets/img/hero-tree.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-repeat: no-repeat;
    z-index: -1;
    filter: blur(8px);
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.2);
    background-blend-mode: screen;
}

body>header {
    background-color: rgba(255, 255, 255, 0.6);
    background-blend-mode: screen;
    padding: 0 4px 4px;
    overflow: visible;
}

body>footer {
    background-color: rgba(255, 255, 255, 0.6);
    background-blend-mode: screen;
}

main { flex: 1; }
footer { padding: 1rem 0; }
footer container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
footer p { margin-bottom: 0; }

header.hero {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 1em;
    margin-bottom: 1em;
    display: flex;
    align-items: flex-start;
    gap: 2em;
}

section {
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 1em;
}

.button, .button.button, a.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--btn-cta-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
}
.button:hover, .button.button:hover, a.button:hover {
    background-color: var(--btn-cta-hover);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    grid-auto-rows: 1fr;
}
div.grid>article.box { border: 1px solid white; background: rgba(255,255,255,0.3); }
a.is-info { border: 1px solid black; background-color: transparent; color: black; }

div.card {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    margin-top: 1em;
    padding: 1em;
}
div.grid>div.box { background-color: transparent; border: 1px solid white; margin: 1em; padding: 1em; border-radius: 12px; }
section>article, section>article>article { background-color: transparent; border: 1px solid white; border-radius: 12px; }
div.tag { background-color: white; border-radius: 4px; display: inline-block; font-weight: bold; padding: 2px; margin: 4px; }
article.box, article.card { background-color: transparent; border: 1px solid white; border-radius: 12px; }

.form-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-actions .button, .form-actions button, .form-actions a.button { width: auto; }
.is-hidden { display: none !important; }
.is-visible { display: block; }

/* Responsive */
@media (min-width: 769px) {
    header nav { display: flex; flex-direction: row; align-items: center; }
    header nav > menu { display: flex; flex-direction: row; flex-wrap: wrap; margin-left: auto; }
    header nav > menu > a { margin-left: 1em; }
}

@media (max-width: 768px) {
    header nav { display: flex; flex-direction: column; }
    brand>a { flex-wrap: wrap; }
    brand>a>logo { width: 50px; height: 50px; margin-top: -10px; margin-bottom: -10px; }
    brand>a>n { font-size: 1.3em; }
    brand>a>span { display: none; padding-left: 50px; }
    header nav > menu { display: flex; flex-wrap: wrap; width: 100%; margin-top: 1rem; gap: 0.5rem; }
    header nav > menu > a {
        width: calc(50% - 2rem); box-sizing: border-box; padding: 0.75rem 0.5rem;
        background-color: rgba(255, 255, 255, 0.5); border-radius: 4px; text-align: center;
    }
    header nav > menu > a:hover { background-color: var(--pico-primary); color: white; text-decoration: none; }
    header.hero { flex-direction: column; align-items: center; gap: 1em; }
    footer container { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
}
