/* Grundinställningar */
body {
    background-color: #f5f1e8;
    color: #333333;
    font-family: 'Calibri', sans-serif;
    margin: 0;
}

select#kategori {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #cccccc;
    background-color: #ffffff;
}


/* Standard länkar */
a {
    color: #0077cc;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    font-weight: 500;
}

/* Nedersta linjen endast för vanliga länkar */
a:not(.button)::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #2c692f;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

a:not(.button):hover {
    color: #005999;
}

a:not(.button):hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Knapparna får denna stil */
a.button {
    font-family: 'Calibri', sans-serif;
    display: inline-block;
    padding: 10px 20px;
    background-color: #0077cc;
    color: white;
    border-radius: 12px;
    font-weight: 500;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

a.button:hover {
    background-color: #005999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Kartan */
#map {
    width: 456px;
    height: 400px;
    padding: 0;
}

#map-page { 
    width: 1300px;
    height: 800px;
    margin: 20px auto;
    padding: 20px;
}

/* Rubriker */
h1 { 
    font-size: 2em; 
    text-align: center; 
    font-weight: bold; 
    margin: 0.67em 0; 
}
h2 { 
    font-size: 1.5em; 
    text-align: center; 
    font-weight: bold; 
    margin: 0.83em 0; 
}
h3, h4, h5, h6 { 
    text-align: center; 
    font-weight: bold; 
}
h3 { 
    font-size: 1.17em; 
} 
h4 { 
    font-size: 1em; 
    margin: 1.33em 0; 
}
h5 { 
    font-size: .83em; 
    margin: 1.67em 0; 
} 
h6 { 
    font-size: .67em; 
    margin: 2.33em 0; 
}

.message { 
    color: #ff0000; 
    font-size: large; 
    font-weight: bold; 
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: #7a5a3a;
    background-image: url('stil/bilder/decor/header_bg.png');
    color: #000;
    padding: 15px 0;
    text-align: left;
}
header h1 { 
    margin: 0; 
    font-size: 2em; 
    font-weight: bold; 
    text-align: left; 
}
header img { 
    width: 200px; 
    height: 200px; 
    object-fit: contain; 
}

/* Knappar, grafik exkl. huvudmenyn */
.button { 
    background-color: #007bff; 
    color: white; 
    padding: 3px 20px; 
    border: none; 
    border-radius: 4px; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}
.button:hover { 
    background-color: #0056b3; 
}

/* Rating-stjärnor */
.star { 
    font-size: 24px;
    color: lightgray; 
}
.star.filled, .star.selected { 
    color: gold; 
}
.rating-container { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 0; 
}
.rating-container .star { 
    font-size: 32px; 
    cursor: pointer; 
    transition: color 0.3s ease, transform 0.2s ease; 
}
.rating-container .star:hover { 
    color: orange; 
    transform: scale(1.2); 
}
.rating-container span { 
    font-size: 16px; 
    color: #555555; 
}

/* Navigation */
nav { 
    background-color: #333333; 
    color: white; 
    text-align: center; 
    padding: 1rem 0; 
    position: static; 
    z-index: 100; 
}
nav a { 
    color: white; 
    padding: 15px 20px; 
    text-decoration: none; 
    text-transform: uppercase; 
    font-weight: bold; 
    display: inline-block; 
}
nav a:hover, nav a.active { 
    background-color: #007bff; 
    border-radius: 5px; 
}

/* Meny */
.menu a { 
    text-decoration: none; 
    padding: 10px 20px; 
    background-color: #4CAF50; 
    color: white; 
    border-radius: 5px; 
    margin: 5px; font-weight: bold; 
}
.menu a:hover { 
    background-color: #2c692f; 
}

/* Dropdown */
.dropdown { display: none; }
.dropdown .dropbtn { 
    background-color: #4CAF50; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    cursor: pointer; 
    font-size: 16px; 
}
.dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: #4CAF50; 
    min-width: 160px; z-index: 1; 
    border-radius: 5px; 
}
.dropdown-content a { 
    padding: 12px 16px; 
    text-decoration: none; 
    display: block; 
    color: white; 
}
.dropdown-content a:hover { 
    background-color: #45a049; 
}
.dropdown-content.show { 
    display: block; 
}

/* Loginsidan */
.login-container { 
    background-color: #fff; 
    max-width: 400px; 
    margin: 50px auto; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.login-container h2 { 
    color: #007bff; 
    font-size: 1.8rem; 
    margin-bottom: 20px; 
    text-align: center; 
}
.form-group { 
    margin-bottom: 15px; 
}
label { 
    font-size: 1rem; 
    color: #555; 
}
input[type="text"], input[type="password"] { 
    width: 200px; 
    padding: 10px; 
    margin-top: 8px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 1rem; 
}
button { 
    background-color: #007bff; 
    color: white; 
    padding: 12px 20px; 
    border: none; 
    border-radius: 4px; 
    font-size: 1rem; 
    cursor: pointer; 
    width: 200px; 
    margin-top: 10px; 
}
button:hover { 
    background-color: #0056b3; 
}

/* Dashboard */
.dashboard-container, 
.store-list, 
.filter-container, 
.versions-container { 
    background-color: #ffffff; 
    max-width: 800px; 
    margin: 30px auto; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.main-container { 
    display: flex; 
    gap: 100px; 
    justify-content: center; 
    padding: 20px; 
}
.content-pages-left { 
    width: 15rem;
    padding: 20px; 
    background-color: #fff; 
    border-radius: 12px; 
}
.content-pages-right { 
    width: 400px;
    padding: 20px; 
    background-color: #fff; 
    border-radius: 12px; 
}
.content-index-left { 
    width: 50rem;
    padding: 20px; 
    border-radius: 12px; 
}
.content-index-right { 
    width: 28.5rem;
    padding: 20px; 
    border-radius: 12px; 
}

/* Kategori kort */
.category-card-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; 
    max-width: 800px; 
    margin: 30px auto; 
    padding: 20px; 
}
.category-card {
    text-decoration: none; 
    color: #000; 
    border-radius: 12px; 
    overflow: hidden; 
    background: #f5f5f5; 
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}
.category-card img { 
    width: 100%; 
    height: 192px; 
    object-fit: cover; 
    display: block; 
}
.category-card span { 
    display: block; 
    text-align: center; 
    padding: 12px; 
    font-weight: 600; 
    background: #fff; 
}
.category-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.15); 
}

footer {
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  padding: 0.5rem;
  width: 80%;
  margin: 10px auto 0 auto;
  font-size: 0.9rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Responsivitet för små skärmar */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }
    #map { width: 21rem; height: 250px; }
    #map-page { width: 18rem; height: 250px; }
    .category-card img { height: 150px; }
    .content-index-left,
    .content-index-right {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        box-sizing: border-box;
    }
}

@media (max-width: 402px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }
    header h1 { font-size: 1rem; }
    .category-card img { height: 120px; }
    #map { width: 21rem; height: 250px; }
    #map-page { width: 18rem; height: 250px; }
    .main-content h2 { font-size: 1.3rem; }
    button { padding: 10px 18px; width: 100%; }
    .store-list, .store-item { width: 90%; }
    .content-index-left,
    .content-index-right {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        box-sizing: border-box;
    }
}