*, *::after, *::before {
    box-sizing: border-box;
}

a {
    transition: all 0.4s ease;
}

a:link, a:visited {
    color: #137A95;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover, a:active {
    color: #777C8A;
    text-decoration: none;
}

body {
    font-family: "Roboto", sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    font-weight: 300;
    position: relative;
    background: rgba(10, 20, 35, 0.5);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('tausta.png') no-repeat bottom center;
    filter: blur(3px);
    transform: scale(1.05);
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(10,20,35,0.35);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Playfair Display", serif;
    font-weight: 300;
}

strong, b {
    font-weight: 600;
    color: #0d5263;
}

.star-list li::marker {
    content: "\2605   "; /* tai joku muu haluttu kuvio */
    color: #0d5263;
}

.container {
    max-width: 1100px;
    width: 100%;
    margin-inline: auto;
    margin-top: 1rem;

    display: flex;
    flex-direction: column;

    padding-inline: 1.25rem;
    padding-bottom: 2.5rem;
}

header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-inline: 1.85rem;
    padding-block: 2rem;
    width: 100%;
    border-radius: 0.5rem 0.5rem 0 0;

    background: rgba(20, 28, 40, 0.35);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.header-title {
    width: 58%;
    margin-inline-start: auto;
    margin: 0;
    padding-right: 1.25rem;

    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    line-height: 1.25;
    letter-spacing: 0.02em;

    color: rgba(245,243,238,0.96);
    text-align: right;
    text-wrap: balance;
    display: block;

    text-shadow: 0 6px 18px rgba(0,0,0,0.28);
}

.header-title span {
    color: #B89A4D;
    letter-spacing: 0.1em;
}

nav {
    width: 42%;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    padding-left: 1.25rem;
}

nav a.nav-link {
    background: none;
    border: none;
    padding: .2rem 0;
    border-radius: 0;

    color: rgba(245,243,238,0.88);
    font-weight: 400;
    text-decoration: none;
    font-family: "Playfair Display", serif;

    position: relative;
}

nav a.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: rgba(184,154,77,0.55); /* kulta */
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease-out allow-discrete;
}

nav a.nav-link:hover {
    color: #F5F3EE;
}

nav a.nav-link:hover::after {
    transform: scaleX(1);
}

nav a.nav-link.active {
    color: #F5F3EE;
}

nav a.nav-link.active::after {
    transform: scaleX(1);
    background: rgba(184,154,77,0.8);
}

.content {
    background-color: rgba(255, 255, 252, 0.8);
    padding: 2rem 3.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin-block-end: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-sidebar {
  align-self: start;
}

.panel {
    position: relative;
    padding: 1rem;
    margin-bottom: 1.25rem;

    border-radius: 0.75rem;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(0,0,0,0.05);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 0.6rem;
    border: 1px solid rgba(184,154,77,0.2);
    pointer-events: none;
}

.panel--news {
    position: relative;
}

.panel--news .news-list {
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

.panel--news .news-list::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(184,154,77,0.25);
    border-radius: 2px;
}

.panel--news .news-item {
    position: relative;
    padding: 1rem;
    border-top: 1px solid rgba(0,0,0,0.07);
}

.panel--news .news-item:first-child {
    border-top: none;
    padding-top: 0.25rem;
}

.panel--news .news-item time {
    float: left;
    margin-right: 0.75rem;
    margin-top: 0.2rem;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(20,28,40,0.72);

    padding: 0.25rem 0.25rem;
    border-radius: 999px;
    background: rgba(184,154,77,0.15);
    border: 1px solid rgba(184,154,77,0.25);
}

.panel--news .news-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(20,28,40,0.88);
}

.panel--links .link-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.panel--links .link-list li {
    padding: 0.65rem 0;
    border-top: 1px solid rgba(0,0,0,0.07);
}

.panel--links .link-list li:first-child { border-top: none; }

.panel--links .link-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;

    color: rgba(20,28,40,0.88);
    font-weight: 650;
}

.panel--links .link-list a::before {
    content: "\2192";
    color: rgba(184,154,77,0.95);
    font-size: 0.9rem;
}

.panel h2 {
    border-bottom: 2px solid rgba(184,154,77,0.25);
}

footer {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(245,243,238,0.72);
}

footer a:link, footer a:visited {
    color: rgba(19, 17, 39, 0.88);
    text-decoration: none;
}

@media (max-width: 980px) {
  .content-grid { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.25rem;
    }

    .header-title, nav {
        width: 100%;
        margin: 0;
        text-align: center;
    }

    nav {
        justify-content: center;
    }

    .content {
        padding: 2rem;
    }
}