/*
 * Laboratory of Glass & Ceramic Materials – site styles
 *
 *  1. Tokens
 *  2. Base
 *  3. Language switching
 *  4. Page shell and header
 *  5. Sidebar: navigation and contacts
 *  6. Main content
 *  7. Home page
 *  8. Equipment pages
 *  9. Profile page
 * 10. Footer
 * 11. Responsive
 */

/* 1. Tokens ------------------------------------------------------------- */

:root {
    --ink: #172b3c;
    --muted: #667987;
    --navy: #102f46;
    --blue: #174f70;
    --teal: #197c83;
    --link: #146b77;
    --link-hover: #0c4f59;
    --canvas: #f3f7f8;
    --surface: #f7fafb;
    --line: #e0e9eb;
    --accent: #ff9a00;
    --font-body: "DM Sans", Arial, sans-serif;
    --font-heading: "Manrope", sans-serif;
}

/* 2. Base --------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: clamp(12px, 3vw, 42px);
    color: var(--ink);
    background:
        radial-gradient(ellipse at 12% 0%, #b8d8d4 0, transparent 48%),
        radial-gradient(ellipse at 96% 12%, #bdcfe3 0, transparent 46%),
        #eaf0f2;
    background-attachment: fixed;
    font: 16px/1.7 var(--font-body);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

p {
    margin: 0 0 1rem;
}

ul,
ol {
    margin: 0 0 1rem;
    padding-left: 2rem;
}

img,
svg {
    vertical-align: middle;
}

table {
    border-collapse: collapse;
}

th {
    text-align: inherit;
}

hr {
    margin: 5px 1px;
    border: 0;
    border-top: 1px solid;
    color: inherit;
    opacity: 0.25;
}

a {
    color: #006;
    text-decoration: none;
}

a:hover,
a:focus {
    color: #ccc;
}

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

button {
    font: inherit;
    color: inherit;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 6000;
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff;
    background: var(--navy);
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

/* 3. Language switching -------------------------------------------------
 * Text exists in both languages; show only the one matching <html lang>.
 */

html:not([lang="en"]) [data-lang="en"],
html[lang="en"] [data-lang="bg"] {
    display: none !important;
}

.languages {
    min-height: 28px;
    text-align: right;
}

.lang-btn {
    margin-left: 7px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
    padding: 3px;
    background-color: #336;
}

.flag {
    display: block;
    width: 28px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 1px 4px #17394a22;
}

/* 4. Page shell and header ---------------------------------------------- */

.container {
    width: min(100%, 1440px);
    margin: 0 auto;
    overflow: clip;
    border: 1px solid #ffffffd9;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 24px 80px #1836491f;
}

.header {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 6vw, 78px) 28px;
    color: #fff;
    background: linear-gradient(115deg, var(--navy), var(--blue) 58%, var(--teal));
}

.header::after {
    position: absolute;
    top: -95px;
    right: -30px;
    width: 390px;
    height: 390px;
    border: 1px solid #ffffff22;
    border-radius: 50%;
    box-shadow: 0 0 0 34px #ffffff09, 0 0 0 70px #ffffff06;
    content: "";
    pointer-events: none;
}

.site-title,
.site-subtitle {
    position: relative;
    z-index: 1;
    max-width: 850px;
}

.site-title {
    margin: 0;
    font: 800 clamp(1.85rem, 4.5vw, 3.55rem)/1.12 var(--font-heading);
    letter-spacing: -0.045em;
}

.site-subtitle {
    margin: 14px 0 0;
    color: #ffffffbf;
    font: 500 clamp(0.95rem, 1.8vw, 1.18rem)/1.5 var(--font-body);
}

.section {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    align-items: start;
    background: var(--surface);
}

.page-home .section {
    grid-template-columns: 290px minmax(0, 1fr) 365px;
}

/* 5. Sidebar: navigation and contacts ----------------------------------- */

.sidebar1 {
    min-height: 100%;
    padding: 24px 16px;
    border-right: 1px solid var(--line);
    background: var(--canvas);
}

.page-equipment .sidebar1,
.page-profile .sidebar1 {
    min-height: 800px;
}

/* Profile page: the sidebar stretches to the full page height so its
   navigation can stay in view while the long CV is scrolled. */
.page-profile .sidebar1 {
    align-self: stretch;
}

#fixnav {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

ul.nav {
    margin: 0;
    padding: 11px 12px;
    list-style: none;
    font: 600 0.92rem/1.35 var(--font-body);
}

ul.nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 10px;
    color: #405867;
    transition: color 0.18s, background 0.18s, transform 0.18s;
}

ul.nav a:hover,
ul.nav a:focus {
    color: var(--navy);
    background: #e5eff0;
    transform: translateX(2px);
}

ul.nav a.current {
    color: #fff;
    background: linear-gradient(110deg, var(--blue), var(--teal));
    box-shadow: 0 6px 15px #174f702b;
}

.contacts {
    margin: 24px 0 0;
    padding: 17px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--muted);
    background: #fff;
    font-size: 0.9rem;
}

.contacts .contacts-title {
    margin: 0 0 12px;
    color: var(--ink);
    font: 700 0.78rem/1.3 var(--font-heading);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contacts .contacts-title::after {
    content: ":";
}

.contacts a {
    color: #216c76;
}

.contacts a:hover,
.contacts a:focus {
    color: #104957;
}

.contacts .myButton {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 9px;
    color: #fff;
    background: var(--blue);
    font: italic 600 0.88rem var(--font-body);
}

.contacts .myButton:hover,
.contacts .myButton:focus,
.contacts .myButton.current {
    color: #fff;
    background: var(--navy);
}

.myButton:active {
    position: relative;
    top: 1px;
}

.submenu2 {
    margin: 0;
    padding-left: 18px;
    color: var(--accent);
}

.submenu2 li {
    margin: 5px 0;
}

.submenu2 a {
    font-style: italic;
}

.contact-text {
    margin: 12px 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.sidebar1 .contact-text {
    text-align: left;
    white-space: nowrap;
}

.sidebar1 .contact-text > a {
    display: flex;
    align-items: center;
}

.contact-icon {
    display: inline-block;
    width: 19px;
    height: 19px;
    margin: 0 7px 0 0;
    object-fit: contain;
}

.gmap-container {
    margin: 1rem 0;
}

.gmap-container iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 0.5rem;
}

#ifh {
    display: block;
    margin-top: 22px;
    text-align: center;
}

#ifh img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 8px;
}

/* 6. Main content ------------------------------------------------------- */

.content,
.center {
    min-width: 0;
    padding: clamp(24px, 4vw, 54px);
    color: var(--ink);
    background: #fff;
    font: 400 1rem/1.75 var(--font-body);
}

.content h1,
.content h2,
.content h3 {
    color: var(--navy);
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.content .page-title,
.content h2 {
    margin: 0 0 18px;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

.content h3,
.content .subheading {
    margin-top: 1.8rem;
    font-size: 1.22rem;
}

.content p {
    max-width: 78ch;
    color: #405563;
}

.content a {
    color: var(--link);
}

.content a:hover,
.content a:focus {
    color: var(--link-hover);
}

.content ul,
.content ol {
    padding: 0 15px 15px 40px;
}

.content hr {
    margin: 22px 0;
    border-color: var(--line);
    opacity: 1;
}

/* 7. Home page ---------------------------------------------------------- */

.center {
    align-self: stretch;
}

#main {
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto;
    max-height: 440px;
    margin: 0 auto 28px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 14px 32px #17394a26;
}

.center .content {
    padding: 26px 0 0;
    background: transparent;
}

.center .page-title {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.center #inf p {
    margin-bottom: 1.75rem;
}

.sidebar2 {
    min-width: 0;
    padding: 24px 18px;
    border-left: 1px solid var(--line);
    background: var(--canvas);
}

.ceni {
    margin: 14px 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    font: 0.88rem/normal Arial, Helvetica, sans-serif;
}

#divceni > h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 0.5rem;
    font-size: min(calc(1.3rem + 0.6vw), 1.75rem);
    text-transform: uppercase;
}

#divceni > h2 > a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #edf4f5;
}

#divceni > h2 > a:hover {
    background: #dcebea;
}

#divceni > h2 img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.cenorazpis {
    width: 100%;
    margin-top: 5%;
    color: #435b69;
    font-size: 0.82rem;
    text-align: left;
}

.cenorazpis th,
.cenorazpis td {
    padding: 9px 8px;
    border-bottom: 1px solid var(--line);
}

.cenorazpis th {
    color: var(--navy);
}

.cenorazpis tbody tr:nth-child(odd) {
    background: #f4f8f8;
}

.conditions summary {
    display: block;
    color: var(--link);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: underline;
    cursor: pointer;
}

.conditions ul {
    margin-top: 0.75rem;
    padding-left: 22px;
    color: var(--muted);
}

/* 8. Equipment pages ---------------------------------------------------- */

.equipment {
    display: flex;
    flex-direction: column;
}

.equipment .page-title {
    margin-bottom: 0;
    text-align: center;
}

.equipment .languages {
    align-self: flex-end;
    margin: 0 0 1rem;
}

.instrument-logo {
    display: flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 78px;
    margin: 0 0 1rem 1rem;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.logoinstrument {
    display: block;
    width: auto;
    max-width: 145px;
    height: auto;
    max-height: 76px;
    object-fit: contain;
}

.equipment #inf {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.gallery {
    display: flex;
    justify-content: center;
    gap: 2px;
    width: 100%;
    margin: 1.5rem 0 0;
    padding: 14px !important;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    list-style: none;
}

.gallery li {
    flex: 0 0 150px;
}

.gallery img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

/* 9. Profile page ------------------------------------------------------- */

.profile .orange,
.profile .orange a {
    color: var(--blue);
}

.tinfo2 {
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
}

.tinfo2 h1 {
    margin: 0 0 1rem;
    padding-top: 15px;
    font-size: calc(1.375rem + 1.5vw);
    letter-spacing: -0.035em;
}

.tinfo2 p.orange {
    max-width: none;
    margin: 0;
    padding-top: 15px;
    font: 500 1.5rem/1.2 var(--font-body);
}

.profile-picture {
    max-width: min(100%, 220px);
    height: auto;
    border: 4px solid #fff;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 12px 28px #17394a26;
}

.content .submenu {
    max-width: none;
    margin: 2rem;
    color: var(--muted);
    text-align: center;
}

.submenu a {
    font-weight: 700;
    text-decoration: underline;
}

.tinfo {
    margin: 16px 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.tinfo-group h3 {
    margin: 0;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--line);
}

.content .dash-list {
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px;
    background: var(--canvas);
    list-style: none;
}

.dash-list li {
    margin: 0.45rem 0;
    color: #405563;
}

.dash-list li::before {
    content: "-";
}

.sections li {
    margin: 1rem 0;
}

.interview_list {
    list-style-image: url("../images/17327-200.png");
    list-style-position: inside;
}

.interview-toggle {
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.interview {
    display: none;
}

.media {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.scrollToTop {
    position: fixed;
    right: 50px;
    bottom: 10px;
    z-index: 1000;
    display: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: whitesmoke url("../images/scrolltop.png") center / 50px no-repeat;
}

.scrollToTop.is-visible {
    display: block;
}

/* 10. Footer ------------------------------------------------------------ */

.footer {
    padding: 20px 26px;
    color: #d9e5e9;
    background: var(--navy);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 4px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.footer-links li {
    padding: 6px 10px;
}

.footer a {
    color: #d5e8e6;
}

.footer a:hover,
.footer a:focus {
    color: #fff;
}

.footer em {
    color: #98b6bf;
}

/* 11. Responsive -------------------------------------------------------- */

.slicknav_menu {
    display: none;
}

@media (max-width: 1100px) {
    .section,
    .page-home .section {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .sidebar2 {
        grid-column: 2;
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 800px) {
    body {
        padding: 0;
    }

    .container {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .header {
        padding: 76px 22px 34px;
    }

    .section,
    .page-home .section {
        display: block;
    }

    .sidebar1 {
        display: none;
    }

    .content,
    .center {
        padding: 25px 20px 34px;
    }

    .center .content {
        padding: 24px 0 0;
    }

    .sidebar2 {
        padding: 22px 20px;
    }

    .slicknav_menu {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 5000;
        display: block;
        width: 100%;
        border-radius: 0;
        background: #102f46f7;
        font: bold 16px var(--font-body);
        text-align: center;
        opacity: 0.98;
    }

    .slicknav_btn {
        background: var(--teal);
    }

    .slicknav_nav .current {
        border-radius: 7px;
        color: #999;
        background-color: #336;
    }

    .slicknav_menu .languages {
        float: left;
    }

    .contacts {
        margin: 24px 0 0;
        text-align: center;
        list-style-position: inside;
    }

    .equipment .languages,
    .instrument-logo {
        align-self: flex-start;
        margin: 1rem 0;
    }

    .gallery {
        justify-content: flex-start;
        padding: 8px !important;
    }

    .gallery li {
        flex-basis: 140px;
    }

    .footer {
        padding: 16px;
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
