
:root{
    --primary:#661E0F;
    --gradient1:#8E4100;
    --gradient2:#B87123;
    --gradient3:#5FEAE2;
    --gradient4:#23D2D2;
    --primary-dark:#25C2C2;
    --secondary:#f5f7fa;
    --text:#333;
    --light:#ffffff;
}
*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}
body{
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    line-height:1.6;
    color:var(--text);
    background:var(--secondary);
}
header{
    background:linear-gradient(120deg,var(--primary),var(--gradient1),var(--gradient2),var(--gradient4),var(--primary-dark));
    color:var(--light);
    padding:1.5rem 1rem;
    position: relative; 
}
header .logo {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    height: 100px;        /* adjust for size */
    width: auto;
}
header h1{
    font-size:1.4rem;
    margin-bottom:0.25rem;
    line-height:1.3;
}
header h2{
    font-size:0.85rem;
    font-weight:400;
    opacity:.9;
}
nav ul{
    list-style:none;
    display:flex;
    flex-wrap:wrap;
    gap:.5rem;
    margin-top:1rem;
    align-items: center; 
}

/* same look for normal links and EN/RO current label */
nav a,
nav li.lang-switch .lang-current {
    color:var(--light);
    text-decoration:none;
    padding:.4rem .8rem;
    border-radius:.3rem;
    transition:background .2s;
    display: inline-block;
}

/* hover / active */
nav a:hover,
nav a.active,
nav li.lang-switch:hover .lang-current{
    background:rgba(255,255,255,.15);
}

nav li.lang-switch {
    position: relative;
}

/* dropdown directly under EN, no gap */
nav li.lang-switch .lang-menu {
    display: none;
    position: absolute;
    top: 100%;          /* touches the bottom of EN */
    left: 0;
    background: rgba(0,0,0,0.8);
    border-radius: 0.3rem;
    padding: 0.2rem 0;
    min-width: 3rem;
    z-index: 10;
    margin: 0;          /* IMPORTANT: no gap */
}

nav li.lang-switch .lang-menu a {
    display: block;
    padding: 0.2rem 0.8rem;
    color: var(--light);
    text-decoration: none;
    white-space: nowrap;
}

nav li.lang-switch .lang-menu a:hover {
    background: rgba(255,255,255,0.15);
}

/* show dropdown while hovering EN *or* the dropdown */
nav li.lang-switch:hover .lang-menu {
    display: block;
}


main{
    display:grid;
    grid-template-columns:1fr;
    gap:2rem;
    padding:2rem 1rem;
    max-width:1200px;
    margin:auto;
}
@media (min-width:768px){
    main{
        grid-template-columns:3fr 1fr;
    }
}
aside{
    background:var(--light);
    padding:1.5rem;
    border-radius:.5rem;
    box-shadow:0 2px 4px rgba(0,0,0,.05);
}
.events h3{
    margin-bottom:1rem;
    font-size:1.1rem;
    color:var(--primary);
}
.events article{
    margin-bottom:1rem;
}
.events time{
    font-weight:600;
    display:block;
}
section{
    background:var(--light);
    padding:1.5rem;
    border-radius:.5rem;
    box-shadow:0 2px 4px rgba(0,0,0,.05);
}
section h2{
    color:var(--primary);
    margin-bottom:1rem;
}
footer{
    text-align:center;
    padding:2rem 1rem;
    background:#1b1b1b;
    color:var(--light);
    margin-top:2rem;
}
footer a{
    color:var(--light);
    text-decoration:none;
    margin:0 .5rem;
}

p.justified {
    text-align: justify;
}

li {
    text-align: justify;
}
figure {
    text-align: center;
    margin: 1.5rem auto;
}

figure img {
    max-width: 100%;
    height: auto;
}

figure figcaption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.5rem;
}

.affiliations {
    margin-left: 1.5rem;     /* indent the whole list */
    padding-left: 1rem;      /* fine-tune if needed */
    text-align: justify;     /* optional */
}
