/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * <link href="guide.css" rel="Stylesheet" type="text/css">
 */
/*
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
 +                     LIBREOFFICE GUIDES IN BROWSER                 +
 +                          COLORS STYLESHEET                       +
 +                           WESTERN LANGUAGES                       +
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 */

@import url('guidecolors.css');

:root {
    --container-width: 1200px;

    

}

body * {
    box-sizing: border-box;
}

body {
    color: var(--dark-color);
    background-color: var(--light-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: hsl(from var(--title-color) h s calc(l * var(--title-l)));
    text-decoration: none;
}

a:hover {
    color: hsl(from var(--primary-color) h s calc(l * var(--title-l)));
    text-decoration: underline;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.tdf-banner {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 60px;
    background: var(--gradient-blue);
    color: white;
    font-size: 1.2rem;
    box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 12px;
    box-shadow: var(--box-shadow);
    margin: 10px;
    border-radius: 12px;
    max-width: var(--container-width);
    margin: 1rem auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

nav {
    /* use HSL relative to the page background: lighten body L by +8% for nav in default */
    background-color: hsl(var(--body-h) var(--body-s) calc(var(--body-l)));
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* In dark theme make nav slightly darker than the body by reducing L by 8% */
html.theme-dark nav {
    /* background-color: hsl(var(--body-h) var(--body-s) calc(var(--body-l))); */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--accent-color);
    color: white;
}

#theme-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: inherit;
    padding: 6px 10px;
    border-radius: .5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

#theme-toggle:hover {
    box-shadow: var(--box-shadow);
}

#theme-toggle .icon {
    position: absolute;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 240ms cubic-bezier(.2,.9,.2,1), opacity 200ms ease;
    will-change: transform, opacity;
}

#theme-toggle .icon-moon { opacity: 1; transform: translateY(0) scale(1); }
#theme-toggle .icon-sun { opacity: 0; transform: translateY(8px) scale(.85); }

#theme-toggle[aria-pressed="true"] .icon-moon { opacity: 0; transform: translateY(-8px) scale(.85); }
#theme-toggle[aria-pressed="true"] .icon-sun { opacity: 1; transform: translateY(0) scale(1); }

@media (prefers-reduced-motion: reduce) {
    #theme-toggle .icon { transition: none; }
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 250px;
}

.search-bar button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.hero {
    background-color: hsl(var(--body-h) var(--body-s) calc(var(--body-l)));
    padding: 3rem;
    margin: 2rem 0;
    border-radius: .5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    box-shadow: var(--box-shadow);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: .5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    /* color: hsl(from var(--light-color) h s calc(l * var(--title-l))); */
    color: white;
}

.btn-secondary {
    background-color: var(--accent-color);
}

.btn-secondary:hover {
    background-color: #0097a7;
}

.chapters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.chapter-card {
    display: flex;
    flex-direction: column;
    background-color: hsl(var(--body-h) var(--body-s) calc(var(--body-l)));
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chapter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.chapter-card h3 {
    color: hsl(from var(--title-color) h s calc(l * var(--title-l)));
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.chapter-card p {
    color: var(--dark-color);
}

.chapter-card .btn {
    display: block;
    text-align: center;
    margin-top: auto;
}

.chapter-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

footer {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0 0 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
    }

    .nav-links,
    nav.navbar {
        display: none;
    }

    .chapters {
        grid-template-columns: 1fr;
    }
}