/* css/layout.css - Common styles for perio-tools.com */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@100;300;400;500;700&display=swap');

:root {
    --primary-blue: #17669d;
    --dark-blue: #0b304a;
    --bg-grey: #e7e7e7;
    --border-grey: #EEEEEE;
    --text-main: #333333;
    --text-light: #777777;
}

/* Breadcrumbs */
.breadcrumb-container {
    display: flex;
    padding: 15px 0 0 0;
    margin-bottom: -15px;
    /* Etwas näher an den Titel rücken */
}

.breadcrumbs {
    font-size: 13px;
    /* Etwas kleiner */
    color: #999;
    /* Etwas helleres Grau */
}

.breadcrumbs a {
    color: #777;
    /* Links auch dezenter */
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.breadcrumbs .sep {
    margin: 0 8px;
    color: #DDD;
    /* Trenner noch blasser */
}

.breadcrumbs .current {
    color: #AAA;
}

body {
    font-family: 'Heebo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--primary-blue);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    justify-content: center;
}

.main-wrapper {
    width: 1100px;
    max-width: 100%;
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Header Sections */
.header-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: white;
    position: relative;
    z-index: 1001;
}

.sticky-header-part {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: white;
    position: relative;
    z-index: 1000;
}

@media (min-width: 901px) {
    .sticky-header-part {
        position: sticky;
        top: 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0);
        transition: box-shadow 0.3s ease;
    }

    .sticky-header-part.is-shrunk {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Top Menu */
div.top-menu {
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    border-bottom: 1px solid #EEEEEE;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 40px;
}

.top-menu-social {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-top: 5px;
}

.social-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 1;
}

.top-menu-items {
    display: flex;
    gap: 20px;
}

.top-menu-item a {
    text-decoration: none;
    color: #666;
    font-size: 13px;
    font-weight: 300;
}

.top-menu-item a:hover {
    color: var(--primary-blue);
}

.top-menu-text {
    margin: 0;
}

/* Flag Icon Utility */
.flag-icon {
    width: 30px;
    height: 20px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 2px;
}

/* Header Logo Section */
.header-logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: white;
    flex-wrap: wrap;
    gap: 20px;
    transition: padding 0.3s ease;
}

.sticky-header-part.is-shrunk .header-logo-container {
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo img {
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
    vertical-align: middle;
}

.sticky-header-part.is-shrunk .logo img {
    height: 48px;
}

/* Header Menu and Navigation */
.header-menu-container {
    border-top: 1px solid #EEEEEE;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 30px;
    box-shadow: 0 5px 15px -5px #CCCCCC;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 30px;
    display: flex;
    height: 60px;
    align-items: center;
}

.main-nav li {
    margin-right: 30px;
}

.main-nav li a {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 300;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.main-nav li a:hover {
    color: var(--primary-blue);
}

.main-nav li.active a {
    color: var(--dark-blue);
}

/* Language Selector Styles */
.header-language-selector {
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 10px;
    border-radius: 4px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: none;
    min-width: 140px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F8FAFC;
}

.lang-dropdown::-webkit-scrollbar {
    width: 6px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: #F8FAFC;
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background-color: #CBD5E1;
    border-radius: 6px;
}

.header-language-selector:hover .lang-dropdown,
.header-language-selector.active .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 50px 5px 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.lang-option:hover {
    background-color: #f9f9f9;
    color: var(--primary-blue);
}

.lang-option img {
    width: 20px;
    border-radius: 2px;
    height: 14px;
    margin-bottom: 4px;
}

/* Footer */
div.footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: auto;
    width: 1100px;
    max-width: 100%;
    height: 150px;
    background: #363839;
    border-top: 1px solid #EEEEEE;
    border-bottom: 1px solid #4B4C4D;
    box-sizing: border-box;
}

.footer-item {
    flex: 1;
    text-align: center;
}

div.footer a,
div.footer a:visited {
    text-decoration: none !important;
    color: inherit;
    transition: color 0.3s ease;
}

.footer-text {
    font-size: 15px;
    color: #AAA;
    line-height: 1.8;
    margin: 4px 0;
    font-weight: 300;
}

div.footer a:hover .footer-text,
div.footer a:hover {
    color: white !important;
}

/* Copyright */
div.copyright {
    position: relative;
    margin: auto;
    width: 1100px;
    max-width: 100%;
    height: 62px;
    background: #282A2B;
    border-top: 1px solid #282A2B;
    border-bottom: 1px solid #282A2B;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copyright-text {
    margin: 0;
    color: #777;
    font-size: 14px;
    font-weight: 300;
}

@media (max-width: 1100px) {

    div.footer,
    div.copyright {
        width: 100%;
    }
}

@media (max-width: 900px) {
    div.footer {
        flex-direction: column;
        height: auto;
        padding: 40px 20px;
        gap: 30px;
    }

    .footer-item {
        width: 100%;
    }
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 26px;
        color: var(--primary-blue);
        cursor: pointer;
        padding: 8px;
        margin: 0;
    }

    /* Adjust breakpoint for header on mobile */
    .header-logo-container {
        padding: 12px 15px !important;
        flex-wrap: nowrap;
        justify-content: space-between !important;
        box-shadow: 0 5px 15px -5px #CCCCCC;
        position: relative;
        z-index: 1001;
    }

    .logo img {
        height: auto !important;
        max-height: 35px !important;
        max-width: 65vw !important;
        width: auto;
        object-fit: contain;
    }

    .header-search {
        display: none;
    }

    div.top-menu {
        justify-content: center !important;
        padding: 0 15px !important;
    }

    div.top-menu-social {
        gap: 25px !important;
    }

    .top-menu-items .top-menu-item {
        display: none;
    }

    /* Hamburger Menu Logic */
    .header-menu-container {
        max-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 0;
        align-items: stretch;
        position: relative;
        width: 100%;
        transition: max-height 0.4s ease-in-out;
        background: white;
        box-shadow: none;
    }

    .header-menu-container.show {
        max-height: 2000px; /* Increased to accommodate many languages */
        display: flex !important;
        border-bottom: 2px solid var(--primary-blue);
    }

    .main-nav {
        display: block !important;
    }

    .main-nav ul {
        flex-direction: column;
        height: auto;
        padding: 0;
    }

    .main-nav li {
        width: 100%;
        margin: 0;
    }

    .main-nav li a {
        display: block;
        padding: 15px 30px;
        border-top: 1px solid #eee;
        font-weight: 300;
    }

    .header-language-selector {
        border-top: 1px solid #eee;
    }

    .lang-current {
        padding: 15px 30px;
        justify-content: space-between;
    }

    .lang-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        width: 100%;
        background: #f9f9f9;
        max-height: none !important;
        padding-bottom: 30px;
    }

    .lang-option {
        padding-left: 50px;
    }

    /* --- General Layout Responsiveness --- */
    div.footer {
        flex-direction: column;
        height: auto;
        padding: 40px 20px;
        gap: 30px;
    }

    .footer-item {
        width: 100%;
    }

    div.copyright {
        height: auto !important;
        padding: 20px !important;
    }
}

/* Scroll To Top Button */
#scroll-to-top-button {
    background-color: #C7C7C7;
    bottom: 10px;
    height: 45px;
    position: fixed;
    text-align: center;
    width: 60px;
    opacity: 0.9;
    z-index: 100000;
    transition: all 0.2s ease-in-out 0s;
    line-height: 1;
    border-radius: 4px 4px 0 0;
    display: none;
    right: 75px;
    cursor: pointer;
    border: none;
    outline: none;
    padding-top: 5px;
    color: black;
}

#scroll-to-top-button:hover {
    background-color: #eee;
}

#scroll-to-top-button img {
    filter: brightness(0);
    /* Make icon black */
}

@media (max-width: 900px) {
    #scroll-to-top-button {
        right: 15px;
        bottom: 5px;
        width: 50px;
        height: 40px;
    }
}

/* Article Reference & Download Styles */
.parameter-subtitle {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-top: 30px;
    margin-bottom: 10px;
}

.parameter-text {
    font-size: 16px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background-color: #ffffff;
    color: #17669d;
    text-decoration: none;
    border: 1.5px solid #17669d;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 10px 0 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.article-download-btn:hover {
    background-color: var(--primary-blue);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 102, 157, 0.2);
    text-decoration: none;
}

.article-download-btn i {
    font-size: 18px;
}