@font-face {
    font-family: 'Montserrat';
    src: url("/static/fonts/Montserrat-Regular.730ba66c8594.woff2") format('woff2'),
        url("/static/fonts/Montserrat-Regular.5922d02d42dc.woff") format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url("/static/fonts/Montserrat-Bold.13972a36e78c.woff2") format('woff2'),
        url("/static/fonts/Montserrat-Bold.471ee8170768.woff") format('woff');
    font-weight: 700;
    font-style: normal;
}

/* === Color Variables === */
:root {
    --primary: #2980b9;
    --secondary: #27ae60;
    --color-logo: #588b8b;
    --accent: #f39c12;
    --background: #f9f9f9;
    --surface: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #e1e4e8;
}

body {
    background-color: var(--background);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
}

/* === Navbar === */
.navbar-custom {
    background-color: var(--primary) !important;
    color: var(--surface);
    box-shadow: 0 2px 8px rgba(41, 128, 185, 0.08);
}
.navbar-custom .navbar-nav .nav-link {
    color: var(--surface) !important;
    font-weight: 500;
    transition: color 0.2s;
}
.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link.active {
    color: var(--accent) !important;
    cursor: pointer;
}
.navbar-custom .navbar-brand {
    color: var(--surface) !important;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Toggle open/close icons for navbar */
.navbar-toggler .navbar-icon-close { display: none; }
.navbar-toggler[aria-expanded="true"] .navbar-icon-open { display: none; }
.navbar-toggler[aria-expanded="true"] .navbar-icon-close { display: inline-block; }

/* Dropdown menu */
.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus {
    background: var(--accent);
    color: var(--surface);
}

/* === Buttons === */
.btn:hover, .btn:focus {
    text-decoration: none;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--surface);
    border: none;
    transition: background 0.2s;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary);
    color: var(--surface);
}
.btn-secondary {
    background: var(--secondary);
    color: var(--surface);
    border: none;
}
.btn-secondary:hover, .btn-secondary:focus {
    background: var(--secondary);
    color: var(--surface);
}
.btn-accent {
    background: var(--accent);
    color: var(--surface);
    border: none;
}
.btn-accent:hover, .btn-accent:focus {
    background: var(--accent);
    color: var(--surface);
}

.btn-link {
    text-transform: none;
    color: var(--text-main);
}
.btn-link:hover, .btn-link:focus {
    color: var(--primary);
}

/* === Cards / Panels === */
.card-custom {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* === Headings === */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
}

/* === Links === */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover, a:focus {
    color: var(--accent);
    text-decoration: unset;
    cursor: pointer;
}

/* === Utility Classes === */
.text-muted {
    color: var(--text-muted) !important;
}
.bg-surface {
    background: var(--surface) !important;
}
.border-custom {
    border: 1px solid var(--border) !important;
}
.shadow-custom {
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08) !important;
}

.hover-color:hover {
    color: var(--primary) !important;
    transition: background 0.2s;
}

/* === End of Utility Classes === */

.form-label {
    font-weight: 500;
    color: var(--text-main);
}

input {
    color: var(--text-main);
}

.kaerlista-home-container {
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
}

.kaerlista-intro {
    font-size: 1.15rem;
    text-align: center;
}

.custom-hr {
    margin: 2rem 0;
}

.custom-subtitle {
    color: var(--primary);
}

.custom-features {
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.7;
}

/* Auth style */
.form-wrapper {
    position: relative;
    min-height: 400px;
}

.auth-container {
    width: 400px;
    background: var(--surface);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.form-wrapper {
    display: flex;
    width: 200%;
    transition: transform 0.5s ease;
}

.form-box {
    width: 50%;
    padding: 30px;
}

.border {
    border-radius: 0.375rem;
}

.auth-container.active .form-wrapper {
    transform: translateX(-50%);
}

.switch {
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
    color: var(--primary);
}

 .change-language > button {
     border: 0px;
     background-color:transparent;
     line-height: 0px;
 }

 .change-language > button > img {
     width: 25px;
     height: 25px;
 }

 .change-language > form > img {
    width: 20px;
    height: 25px;
 }

/* On mobile, keep content but remove the container styling */
@media (max-width: 576px) {
    /* Hide top navbar on mobile; we'll use bottom nav instead */
    .navbar.navbar-custom { display: none; }

    .kaerlista-home-container {
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    /* Ensure main content isn't hidden behind bottom nav */
    #main-content { padding-bottom: 72px; }

    /* Typography scaling */
    body { font-size: 15px; line-height: 1.6; }
    p, li { font-size: 0.95rem; }
    h1 { font-size: 1.6rem; margin-bottom: 0.75rem; }
    h2 { font-size: 1.4rem; margin-bottom: 0.65rem; }
    h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
    h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
    h5 { font-size: 1.0rem; margin-bottom: 0.5rem; }
    h6 { font-size: 0.95rem; margin-bottom: 0.5rem; }

    /* Images and media */
    img, video, canvas, svg { max-width: 100%; height: auto; }
    .navbar-brand img { height: 24px !important; width: auto !important; }

    /* Cards and containers */
    .card-custom { padding: 1rem; margin-bottom: 1rem; }
    .container { padding-left: 1rem; padding-right: 1rem; }

    /* Forms */
    .form-label { font-size: 0.95rem; }
    .form-control { font-size: 1rem; padding: 0.55rem 0.75rem; }
    .form-box { padding: 20px; }
    .auth-container { width: 100%; border-radius: 0; }

    .mobile-settings > ul > li {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    /* Improve legibility of settings links/buttons on mobile */
    .mobile-settings .list-group-item a,
    .mobile-settings .list-group-item button.btn-link,
    .profile .btn-link {
        font-size: 1.1rem;
    }
    .mobile-settings .list-group-item i {
        font-size: 1.2rem;
    }
}

/* End of Auth style */

/* === Mobile Bottom Navigation === */
.mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 56px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1030; /* above content */
}
.mobile-bottom-nav .mobile-nav-item {
    flex: 1 1 0;
    text-align: center;
    color: var(--text-main);
    font-size: 12px;
}
.mobile-bottom-nav .mobile-nav-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
    color: var(--color-logo);
}
.mobile-bottom-nav .mobile-nav-item span {
    color: var(--color-logo);
}
.mobile-bottom-nav .mobile-nav-item:focus i,
.mobile-bottom-nav .mobile-nav-item:focus span,
.mobile-bottom-nav .mobile-nav-item:hover i,
.mobile-bottom-nav .mobile-nav-item:hover span {
    color: var(--primary);
}
