/* --- 1. GLOBALA VARIABLER --- */
:root {
    --sidebar-width: 250px;
    --bg-blue: #005A9C;
    --accent-orange: #d35400;
    --text-dark: #333333;
    --border-color: #e0e0e0;
    --menu-bg: #f8f9fa;
}

/* --- 2. GRUNDLAYOUT --- */
body {
    display: flex !important;
    flex-direction: column !important;
    margin: 0; padding: 0; width: 100%;
    line-height: 1.7;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: #f4f7f9; 
    background-image: radial-gradient(#d1d9e0 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

.page-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

/* --- 3. HEADER (SÖK & SPRÅK) --- */
.site-header {
    background-color: #ffffff;
    border-bottom: 4px solid var(--bg-blue);
    padding: 10px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-right {
    display: flex !important;
    align-items: center;
    gap: 15px;
}

.search-container { width: 250px; }
.custom-translate-select { 
    padding: 8px; border-radius: 4px; border: 1px solid #ccc; 
    background: white; font-family: inherit;
}

.logo-area { display: flex !important; align-items: center; }
.logo-link { text-decoration: none; }
.logo-icon { margin-right: 12px; transition: transform 0.6s; }
.logo-link:hover .logo-icon { transform: rotate(180deg); }
.logo-main { color: var(--bg-blue); font-weight: 800; font-size: 1.8rem; }
.logo-at { color: var(--accent-orange); font-weight: bold; font-size: 1.4rem; margin: 0 4px; }
.logo-sub { color: #555; font-weight: 300; font-size: 1.6rem; }

/* --- 4. NAVIGATION (SIDEBAR) --- */
nav#sidebar-nav {
    width: var(--sidebar-width);
    background-color: var(--menu-bg);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    position: sticky; top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding-top: 10px;
}

nav a {
    display: flex; justify-content: space-between;
    padding: 15px 25px; text-decoration: none;
    color: var(--text-dark); font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

nav a:hover { background: #fff; color: var(--bg-blue); padding-left: 30px; }
nav a.active {
    background: #fff; color: var(--bg-blue) !important;
    border-left: 5px solid var(--bg-blue); padding-left: 20px !important;
}

/* --- 5. MAIN & HJÄLTEKORT --- */
main { flex-grow: 1; padding: 40px 60px; min-width: 0; }

.hero-card {
    background: #fff; border-radius: 8px; padding: 30px;
    border-left: 10px solid var(--bg-blue); margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- 6. ARTIKLAR & CARDS (DIN PRO-LAYOUT) --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    align-items: stretch; /* Lika höga kort */
}

.article-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e1e4e8;
    border-top: 5px solid var(--bg-blue); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); }

.article-card p {
    flex-grow: 1; /* Trycker ner knappen */
    margin-bottom: 20px;
}

.btn-read-more {
    display: block;
    padding: 12px;
    background-color: var(--bg-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

.btn-read-more:hover { background-color: var(--accent-orange); }

/* --- 7. GALLERI (STARTSIDA & LINUX) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.gallery-item {
    background: #fff; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border-color); box-shadow: 0 3px 6px rgba(0,0,0,0.05);
/* VIKTIGT: Lägg till denna rad för att indikatorn ska stanna inuti kortet */
    position: relative;
}

.gallery-item img {
    width: 100%; height: 200px; object-fit: cover; display: block;
}

.gallery-item span {
    display: block; padding: 12px; text-align: center;
    font-weight: bold; color: var(--bg-blue);
}
/*--*/
/* Status-indikatorn */
.status-indicator {
    position: absolute; 
    top: 10px; 
    right: 10px; 
    padding: 4px 8px;
    font-size: 0.7rem; 
    color: #fff; 
    border-radius: 4px; 
    font-weight: bold;
    /* indikatorn ska synas ännu tydligare mot ljusa bilder */
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.2); */
    /* VIKTIGT: denna för att den ska ligga framför bilden */
    z-index: 10; 
}
.status-indicator.online { background: #27ae60; }
.status-indicator.maintenance { background: #f39c12; }/* -- */
.status-indicator.login { background: #ff0000 !important; } /* Röd *//* -- */


/* --- 8. KONTAKTFORMULÄR --- */
.contact-container {
    max-width: 700px; background: #fff; padding: 35px;
    border-radius: 12px; border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); margin-top: 20px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--bg-blue); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 2px solid #edf2f7;
    border-radius: 8px; font-family: inherit; box-sizing: border-box;
}

.submit-btn {
    background: var(--bg-blue); color: #fff; padding: 14px;
    border: none; border-radius: 8px; width: 100%; font-weight: bold; cursor: pointer;
}
.submit-btn:hover { background: var(--accent-orange); }

/* --- 9. ABOUT & TABELLER --- */
.about-content { display: flex; gap: 40px; margin-bottom: 40px; }
.profile-image {
    width: 220px; height: 220px; object-fit: cover;
    border-radius: 50%; border: 5px solid var(--bg-blue); flex-shrink: 0;
}

.specs-table { width: 100%; border-collapse: collapse; background: #fff; margin: 20px 0; }
.specs-table th, .specs-table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.specs-table th { background: #f8f9fa; color: var(--bg-blue); width: 30%; }

/* --- 10. RESPONSIVITET --- */
@media (max-width: 900px) {
    .page-container { flex-direction: column !important; }
    nav#sidebar-nav { width: 100%; height: auto; position: relative; max-height: none; }
    .about-content { flex-direction: column; align-items: center; text-align: center; }
    main { padding: 25px; }
}

@media (max-width: 600px) {
    .header-content { flex-direction: column; gap: 10px; }
    .header-right { width: 100%; flex-direction: column; }
    .search-container { width: 100%; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* --- 11. FOOTER & MISC --- */
footer { background: #1a1a1a; color: #ccc; padding: 30px; text-align: center; margin-top: 50px; }
.footer-divider { border: 0; border-top: 1px solid #444; margin: 20px 0; }
.goog-te-banner-frame, .skiptranslate, #google_translate_element { display: none !important; }

/* --- HAMBURGERMENY LOGIK --- */

/* Dölj knappen på desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--bg-blue);
    transition: 0.3s;
}

/* Mobil-anpassning (under 900px) */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex; /* Visa knappen */
    }

    nav#sidebar-nav {
        position: fixed;
        left: -100%; /* Skjut ut menyn helt till vänster */
        top: 0;
        width: 250px;
        height: 100vh;
        z-index: 999;
        transition: 0.4s ease-in-out;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    /* När menyn har klassen .active (via JS), skjut in den */
    nav#sidebar-nav.active {
        left: 0;
    }

    /* Gör loggan lite mindre för att få plats med knappen */
    .logo-main { font-size: 1.4rem; }
}

/* --- LINK DASHBOARD SPECIFIK CSS --- */

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.link-list li {
    margin-bottom: 8px;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s ease;
}

.link-item:hover {
    background: #fff;
    border-color: var(--bg-blue);
    color: var(--bg-blue);
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.05);
}

.link-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* En liten badge för att kategorisera länkar inuti korten */
.link-tag {
    font-size: 0.7rem;
    background: #e1e8ed;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    text-transform: uppercase;
}

.filter-container {
    margin-bottom: 25px;
    max-width: 100%;
}

#linkSearch {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#linkSearch:focus {
    border-color: var(--bg-blue);
    box-shadow: 0 0 8px rgba(0, 90, 156, 0.2);
}

/* Stil för att dölja element som inte matchar */
.hidden-link {
    display: none !important;
}

/* --- IFRAME INTEGRATION (FULL WIDTH) --- */

/* När main har denna klass tar vi bort padding så galleriet går kant-i-kant */
main.full-width-main {
    padding: 0 !important;
    max-width: none !important; /* Låt den ta all plats */
}

/* Fix för att footern inte ska synas dubbelt (om du inte vill ha din footer under galleriet) */
/* Om du vill ha din footer kvar, ta bort raden nedan */
.full-width-main footer {
    display: none; 
}