@media (max-width: 1366px)
{
    /* 300px / 16 = 18.75rem. border-radius behålls i px. */
    .main-img { height: 18.75rem; border-radius: 0px; }
}

/* ==========================================================================
   NY BRYTPUNKT (1100px ned till 900px) - För surfplattor & små laptops
   ========================================================================== */
@media (max-width: 1100px) {
    
    /* 1. SÖKBAREN (Hålls kompakt och centrerad istället för jättebred) */
    /* max-width behålls i px för en fast exakt max-gräns på skärmen */
    .overlap-card {
        width: 90% !important;
        max-width: 700px !important;
        margin: 0 auto !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* 40px / 16 = 2.5rem */
    .list-topics-content { padding-top: 2.5rem; }

    .taa
    {
        flex-direction: column;
    }   
}

@media (max-width: 1023px) {

    /* Tvingar hela headerkedjan att tillåta att popupen får sticka ut */
    .ub-global-header,
    .ub-nav-section,
    .ub-nav-wrapper {
        overflow: visible !important;
        transform: none !important;
    }

    .ub-hamburger-container {
        display: block !important;
    }

    /* Gör dator-behållaren viktlös i bakgrunden */
    #mRows {
        display: block !important;
        position: static !important;
        height: 0 !important;
        width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow: visible !important; 
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
    }

    /* ==========================================================================
       VIKTIGT: Nollställ ankaren från desktop så att boxarna inte längre 
       utgår från datorknappens placering ute i högerkanten.
       ========================================================================== */
    #mRows .nav-item-wrapper {
        position: static !important; /* Klipper banden till datorknappen */
        display: block !important;
        height: 0 !important;
        width: 0 !important;
    }

    /* Gömmer dator-länkarna inuti #mRows */
    #mRows a.menuItem,
    #mRows .nav-item-wrapper > a {
        display: none !important;
    }

    /* 14px / 16 = 0.875rem, 10px / 16 = 0.625rem, 15px / 16 = 0.9375rem. border behålls i px. */
    .ub-mobile-dropdown .menuItem {
        display: flex !important;
        align-items: center !important;
        gap: 0.875rem !important;
        width: 100% !important;
        padding: 0.875rem 0.625rem !important;
        border-bottom: 1px solid #f1f3f5 !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
        font-size: 0.9375rem !important;
        font-weight: 500 !important;
        color: var(--text-main, #2d3436) !important;
    }
    
    .ub-mobile-dropdown .menuItem:last-child {
        border-bottom: none !important;
    }

    .ub-mobile-dropdown .menuItem svg {
        flex-shrink: 0;
        color: var(--text-muted, #636e72);
    }
    
    /* 300px / 16 = 18.75rem, 10px / 16 = 0.625rem. border behålls i px. */
    .ub-mobile-dropdown.ub-is-open {
        max-height: 18.75rem; 
        border-bottom: 1px solid var(--border-color, #e4e6eb);
        padding-bottom: 0.625rem;
    }

    /* max-width och box-shadow behålls i px för exakt rendering */
    #loginBox, 
    #signUpBox {
        position: fixed !important;
        
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: auto !important;
        
        transform: none !important; 
        
        width: calc(100vw - 30px) !important; 
        height: max-content !important; 
    }

    /* Tvinga boxarna och dess containers att poppa fram i full storlek */
    #loginBox:not(.hidden), 
    #signUpBox:not(.hidden) {
        display: block !important;
    }
    #loginBox:not(.hidden) .auth-container2,
    #signUpBox:not(.hidden) .auth-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 16px / 16 = 1rem, 15px / 16 = 0.9375rem */
    .edit .box .anns-info .rb, .edit .box .st-info .rb {
        font-family: 'Poppins';
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.2;
        letter-spacing: 0.5px;
        padding-top: 0.9375rem;
    }
    
    .edit .box .anns-info, .edit .box .st-info,
    .edit .box2 .anns-info, .edit .box2 .st-info {
        display: grid;
        grid-template-columns: auto;
    }

    .edit .box .anns-info > div { margin-top: 0px; }  

    .pnr {
        flex-direction: column;
    }

    .edit .box .psn input {
        margin-left: 0px;
    }
   
    .dashboard { grid-template-columns: auto; }

    /* 30px / 16 = 1.875rem, 20px / 16 = 1.25rem */
    .infoBox .box.container {
        display: flex !important;
        flex-direction: column-reverse !important; 
        gap: 1.875rem !important;
        padding: 1.875rem 1.25rem !important;
    }

    /* -80px / 16 = -5rem */
    .infoBox .box.container .text { margin-top: -5rem; padding: 0 !important;}

    .infoBox .box.container .text div {
        padding-right: 0 !important; 
    }

    .infoBox .box.container .text h2 {
        text-align: center !important;
    }

    /* 5px / 16 = 0.3125rem */
    .infoBox .box.container .text div[style*="color:red"] h2 {
        padding-left: 0 !important; 
        text-align: center !important;
        margin-top: 0.3125rem !important;
    }

    /* max-width och border-radius behålls i px */
    .infoBox .box.container img {
        width: 100% !important;
        max-width: 420px !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
        border-radius: 8px !important;
    }

    .infoBox .box .container{ top: -5rem; height: auto;}

    .search-wrapper2 {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important; 
    }

    /* 10px / 16 = 0.625rem */
    .search-wrapper2 input[type="text"] {
        flex: 1 !important;           
        min-width: 0 !important;       
        padding-right: 0.625rem !important; 
        box-sizing: border-box !important;
    }

    /* 48px / 16 = 3rem (Touch-ytor mår bäst av rem så de växer om användaren förstorar allt) */
    .search-wrapper2 .search-button {
        flex-shrink: 0 !important;     
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        
        width: 3rem !important;        
        height: 100% !important;
        padding: 0 !important;
        background: none;              
        border: none;
        cursor: pointer;
    }

    /* 20px / 16 = 1.25rem (Ikoner skalas nu proportionerligt) */
    .search-wrapper2 .search-button img {
        width: 1.25rem !important;        
        height: 1.25rem !important;
        object-fit: contain !important;
    }

    #ob #bar > div 
    {
        justify-self: start;
    }

    /* 10px / 16 = 0.625rem, 12px / 16 = 0.75rem, 15px / 16 = 0.9375rem */
    .list-topics-content {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;       
        overflow-x: auto !important;         
        -webkit-overflow-scrolling: touch;   
        
        gap: 0.625rem !important;                
        padding: 0.75rem 0.9375rem !important;       
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scrollbar-width: none;               
    }

    .list-topics-content::-webkit-scrollbar {
        display: none !important;            
    }

    /* 4px / 16 = 0.25rem, 8px / 16 = 0.5rem */
    .list-topics-content > a,
    .list-topics-content > div {
        display: inline-flex !important;
        flex-direction: column !important;   
        align-items: center !important;      
        justify-content: center !important;  
        flex-shrink: 0 !important;           
        
        background: #ffffff !important;
        padding: 0.25rem 0.5rem !important;       
        text-decoration: none !important;
    }

    /* 14px / 16 = 0.875rem */
    .list-topics-content > a span:first-of-type,
    .list-topics-content > div span:first-of-type {
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        color: var(--text-main, #2d3436) !important;
        white-space: nowrap !important;      
        line-height: 1.3 !important;
        text-align: center !important;
    }

    /* 11.5px / 16 = 0.71875rem, 4px / 16 = 0.25rem */
    .list-topics-content > a span:last-of-type,
    .list-topics-content > div span:last-of-type,
    .list-topics-content > a p,
    .list-topics-content > div p {
        font-size: 0.71875rem !important;
        color: var(--text-muted, #636e72) !important; 
        white-space: nowrap !important;
        line-height: 1.2 !important;
        margin: 0.25rem 0 0 0 !important;        
        text-align: center !important;
    }
}

/* ==========================================================================
   BRYTPUNKT (900px ned till 700px)
   ========================================================================== */
@media (max-width:900px)
{   
    /* 30px / 16 = 1.875rem */
    #contactUs .info.container > div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 1.875rem !important;
    }

    /* 35px / 16 = 2.1875rem */
    #contactUs h2 {
        text-align: center !important;
        margin-bottom: 2.1875rem !important;
    }

    /* 15px / 16 = 0.9375rem */
    #contactUs .buttonGroup {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.9375rem !important;
        margin-top: 0.9375rem !important;
    }

    #contactUs .buttonGroup a,
    #contactUs .buttonGroup .button {
        flex: 1 !important;
        text-align: center !important;
    }
}

/* ==========================================================================
   MOBILBRYTPUNKT (700px)
   ========================================================================== */
/* ==========================================================================
   MOBILBRYTPUNKT (700px) - Fullständigt moderniserad till REM
   ========================================================================== */
@media (max-width:700px)
{
    .anns-section { display: none; }
    
    /* 20px / 16 = 1.25rem */
    #footerMenu { margin-top: 0px; display: flex; flex-direction: column; gap: 1.25rem; }
    
    .sres { display: block; }
    
    /* 150px / 16 = 9.375rem */
    .list-topics-content { width: 9.375rem; }

    .edit .hl { display: grid; align-items: center; width: 100%; grid-template-columns: auto; }
    
    /* 15px / 16 = 0.9375rem */
    .edit .lt { margin-bottom: 0.9375rem; text-align: left; }
    
    /* 180px / 16 = 11.25rem */
    .edit .box .anns-info .keywords { display: flex; flex-direction: column; width: 11.25rem; }
    
    /* 10px / 16 = 0.625rem */
    .edit .action-bar.box .p2 { display: flex; gap: 0.625rem; flex-direction: column; align-items: normal; }
    
    .grider { 
        max-width: none !important; 
    }

    /* 12px / 16 = 0.75rem */
    .dashboard .content {
        background: none !important;
        padding: 0.75rem !important; 
    }

    /* GÖR OM RADEN TILL EN EGEN FRISTÅENDE BOX (CARD) */
    /* 16px / 16 = 1rem, 14px / 16 = 0.875rem. border och border-radius behålls i px. */
    .dashboard .content .grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        background: #ffffff !important;
        border: 1px solid var(--border-color, #e4e6eb) !important;
        border-radius: 8px !important;
        padding: 1rem !important;
        margin-bottom: 0.875rem !important; 
        gap: 0.875rem !important;
    }

    /* GE TEXTEN MER DOMINANS OCH TYNGD */
    /* 18.5px / 16 = 1.15625rem */
    .dashboard .content .grid > div:first-child {
        font-size: 1.15625rem !important;
        line-height: 1.45 !important;
        color: var(--text-main, #2d3436) !important;
        font-weight: 550 !important;       
        word-break: break-word !important; 
    }

    /* KNAPPARNAS BEHÅLLARE */
    /* 10px / 16 = 0.625rem */
    .dashboard .content .grid .flexer,
    .dashboard .content .grid .grider {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.625rem !important;
        margin: 0 !important;
        width: 100% !important;
    }

    /* Göm undan den tomma placeholder-diven för Stakeholder 8 */
    .dashboard .content .grid .grider div:not(.tiny-button):not(.tiny-button2) {
        display: none !important;
    }

    /* TONA NER KNAPPARNA */
    /* 9px / 16 = 0.5625rem, 12px / 16 = 0.75rem, 13.5px / 16 = 0.84375rem. border-radius behålls i px. */
    .dashboard .content .grid .tiny-button,
    .dashboard .content .grid .tiny-button2 {
        flex: 1 !important;
        margin: 0 !important;
        padding: 0.5625rem 0.75rem !important;
        font-size: 0.84375rem !important;
        font-weight: 600 !important;
        height: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        border-radius: 6px !important;
    }

    .dashboard .tiny-button {
        background-color: #f1f3f5 !important; 
        color: #495057 !important;
        border: 1px solid #dee2e6 !important;
    }

    .dashboard .tiny-button2 {
        background-color: #fff5f5 !important; 
        color: #e03131 !important;
        border: 1px solid #ffc9c9 !important;
    }

    /* 18.5px / 16 = 1.15625rem, 25px / 16 = 1.5625rem */
    .dashboard .external {
        margin-top: 0px;
        font-size: 1.15625rem !important;
        line-height: 1.45 !important;
        color: var(--text-main, #2d3436) !important;
        font-weight: 550 !important;       
        word-break: break-word !important; 
        font-family: 'Roboto';
        padding-left: 1.5625rem;
    }

    #rb {
        border: none !important;
    }

    /* KONTAKTA OSS (Mobil-stapling för FAQ-knappar) */
    /* 10px / 16 = 0.625rem */
    #contactUs .buttonGroup {
        flex-direction: column !important;
        gap: 0.625rem !important;
    }
    #contactUs .buttonGroup a,
    #contactUs .buttonGroup .button {
        width: 100% !important;
    }
    #contactUs .support-card {
        width: 100% !important;
        margin-bottom: 0.625rem !important;
    }

    /* LOKALA SIDER / DIVIDED SEKTIONEN (Staplas) */
    /* 25px / 16 = 1.5625rem */
    .unique.container .divided {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5625rem !important;
    }
    .unique.container .divided .d1,
    .unique.container .divided .d2 {
        width: 100% !important;
        padding: 0 !important;
    }

    /* SAMARBETSPARTNERS (Logotyperna staplas luftigt) */
    /* 25px / 16 = 1.5625rem. max-width behålls i px för bildbegränsning. */
    .colab .colabImgs {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5625rem !important;
        width: 100% !important;
    }
    .colab .colabImgs div, 
    .colab .colabImgs #convoy {
        width: auto !important;
        height: auto !important;
    }
    .colab .colabImgs img {
        max-width: 150px !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .anns-section
    {
        grid-template-columns: auto;
    }

    .hero-image-wrapper picture,
    .hero-image-wrapper .main-img {
        display: none !important; 
    }
    
    /* 24px / 16 = 1.5rem */
    .hero-image-wrapper {
        width: 100% !important;
        height: auto !important;          
        padding: 1.5rem 0 !important;       
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* 3. Nollställ alla skrivbordsmarginaler och transformer */
    /* 24px / 16 = 1.5rem. box-shadow behålls i px. */
    .overlap-card {
        transform: none !important;       
        margin: 0 auto !important;        
        margin-bottom: 0 !important;      
        width: calc(100% - 1.5rem) !important; 
        
        box-shadow: 0 0 16px rgba(0, 0, 0, 0.09) !important;
    }
    
    /* 35px / 16 = 2.1875rem */
    .map
    {
        padding-top: 2.1875rem;
    }

    .list-topics-content .item .headline 
    {
        font-size: 1em;
    }
    
    /* 25px / 16 = 1.5625rem */
    .colab { margin-top: 1.5625rem; }

    /* ==========================================================================
       SÖKRESULTAT MOBIL - CENTRERAD BADGE PÅ ÖVERKANTEN (HÄLFTEN UTANFÖR)
       ========================================================================== */
    /* 65px / 16 = 4.0625rem, 12px / 16 = 0.75rem, 20px / 16 = 1.25rem, 14px / 16 = 0.875rem */
    /* border, border-radius och box-shadow behålls i px */
    .anns-list-row-link {
        display: grid !important;
        grid-template-columns: 4.0625rem 1fr !important;
        grid-template-areas: 
            "logo maininfo"
            "footer footer" !important; 
        
        position: relative !important;   
        gap: 0.75rem !important;
        background: #ffffff !important;
        border: 1px solid var(--border-color, #e4e6eb) !important;
        border-radius: 8px !important;
        padding: 1.25rem 0.875rem 0.875rem 0.875rem !important; 
        margin-bottom: 1.25rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
        text-decoration: none !important;
        overflow: visible !important; 
    }

    .anns-content-box,
    .anns-footer {
        display: contents !important;
    }

    /* 1. BADGE - CENTRERAD FLYTANDE PÅ RAMKANTEN */
    .anns-date {
        grid-area: none !important;      
        position: absolute !important;   
        
        top: 0 !important;               
        left: 50% !important;            
        
        transform: translate(-50%, -50%) !important; 
        
        margin: 0 !important;
        padding: 0 !important;
        z-index: 10 !important;          
    }
    
    /* 10.5px / 16 = 0.65625rem, 4px / 16 = 0.25rem, 12px / 16 = 0.75rem. border-radius och box-shadow i px. */
    .anns-date .badge {
        font-size: 0.65625rem !important;
        padding: 0.25rem 0.75rem !important;    
        font-weight: 600 !important;
        white-space: nowrap !important;
        display: inline-block !important;
        border-radius: 20px !important;  
        
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important; 
    }
    
    /* 65px / 16 = 4.0625rem. border och border-radius i px. */
    .anns-image-box {
        grid-area: logo !important;
        width: 4.0625rem !important;
        height: 4.0625rem !important;
        
        border-radius: 6px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .anns-image-box img {
        width: auto !important;
        height: auto !important;
        max-width: 85% !important;  
        max-height: 85% !important; 
        object-fit: contain !important;
    }

    /* 4px / 16 = 0.25rem */
    .anns-main-info {
        grid-area: maininfo !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 0.25rem !important;
    }
    
    /* 15px / 16 = 0.9375rem */
    .anns-header h3 {
        font-size: 0.9375rem !important;
        line-height: 1.35 !important;
        color: var(--text-main, #2d3436) !important;
        font-weight: 600 !important;
        margin: 0 !important;
    }
    
    /* 6px / 16 = 0.375rem, 13px / 16 = 0.8125rem */
    .anns-meta-line {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        column-gap: 0.375rem !important;
        color: var(--text-muted, #636e72) !important;
        font-size: 0.8125rem !important;
    }
    
    .anns-meta-line .anns-company {
        font-weight: 550 !important;
        color: var(--text-main, #2d3436) !important;
    }
    
    /* 5px / 16 = 0.3125rem, 10px / 16 = 0.625rem, 4px / 16 = 0.25rem. border-top i px. */
    .anns-tags {
        grid-area: footer !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3125rem !important;
        border-top: 1px solid #f1f3f5 !important; 
        padding-top: 0.625rem !important;
        margin-top: 0.25rem !important;
        width: 100% !important;
    }
    
    /* 11.5px / 16 = 0.71875rem, 4px / 16 = 0.25rem, 8px / 16 = 0.5rem */
    .anns-tags .sBox2 {
        font-size: 0.71875rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .anns-tags .sBox2:empty {
        display: none !important;
    }

    .filter-grid {
        display: block !important;
        width: 100% !important;
    }

    .filter-sections {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        width: 100% !important;
    }

    .filter-sections > div {
        border-bottom: 1px solid var(--border-color, #e4e6eb) !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 16px / 16 = 1rem, 8px / 16 = 0.5rem, 15px / 16 = 0.9375rem */
    .filter-sections > div > h3 {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem 0.5rem !important; 
        margin: 0 !important;
        cursor: pointer !important;
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        color: var(--text-main, #2d3436) !important;
        user-select: none; 
    }

    /* SKAPA PILEN MED REN CSS */
    /* 7px / 16 = 0.4375rem, 8px / 16 = 0.5rem. border behålls i px. */
    .filter-sections > div > h3::after {
        content: "" !important;
        width: 0.4375rem !important;
        height: 0.4375rem !important;
        border-right: 2px solid var(--text-muted, #636e72) !important;
        border-bottom: 2px solid var(--text-muted, #636e72) !important;
        transform: rotate(45deg) !important; 
        transition: transform 0.2s ease-in-out !important; 
        margin-right: 0.5rem !important;
    }
    
    .filter-sections > div:not(.is-open) > h3 ~ * {
        display: none !important;
    }

    /* 4px / 16 = 0.25rem, 8px / 16 = 0.5rem, 20px / 16 = 1.25rem */
    .filter-sections > div.is-open > h3 ~ * {
        padding: 0.25rem 0.5rem 1.25rem 0.5rem !important;
    }

    .filter-sections > div.is-open > h3::after {
        transform: rotate(-135deg) !important;
    }

    .anns 
    {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 20px / 16 = 1.25rem, 15px / 16 = 0.9375rem */
    #ob { margin-top: 1.25rem; margin-bottom: 0.9375rem !important; }
    
    /* 12px / 16 = 0.75rem */
    #bc {
        font-size: 0.83rem !important;
        line-height: 1.4 !important;
        color: var(--text-muted, #636e72) !important;
    }
    
    /* 16px / 16 = 1rem, 4px / 16 = 0.25rem */
    .bar {
        display: flex !important;
        flex-direction: column !important; 
        align-items: flex-start !important; 
        gap: 1rem !important;
        width: 100% !important;
        padding: 0 0 0.25rem 0 !important;
    }

    #anns-logo-slot {
        width: auto !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
    }
    #anns-logo-slot img 
    {
        max-width: 150px !important;
        object-fit: contain !important;
    }
    
    /* 4px / 16 = 0.25rem */
    .bar .info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.25rem !important;        
    }
    
    /* 18px / 16 = 1.125rem, 2px / 16 = 0.125rem */
    #anns-stakeholder-name {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
        margin: 0 0 0.125rem 0 !important;
        font-weight: 700 !important;
    }
    
    /* 13px / 16 = 0.8125rem */
    #anns-stakeholder-type, #anns-tax-badge {
        font-size: 0.8125rem !important;
    }
    
    /* 4px / 16 = 0.25rem, 13.5px / 16 = 0.84375rem */
    .bar .address {
        margin-top: 0.25rem !important;
        font-size: 0.84375rem !important;
        line-height: 1.4 !important;
        color: #4a5568 !important;
    }

    /* 3. KONTAKTKNAPPARNA - Sida vid sida i fullbredd */
    /* 10px / 16 = 0.625rem, 4px / 16 = 0.25rem */
    .bar .buttons {
        display: flex !important;
        flex-direction: row !important; 
        gap: 0.625rem !important;
        width: 100% !important;
        margin-top: 0.25rem !important;
    }

    /* 8px / 16 = 0.5rem, 12px / 16 = 0.75rem, 14px / 16 = 0.875rem, 46px / 16 = 2.875rem. border-radius i px. */
    .bar .buttons a.tel,
    .bar .buttons button.email {
        flex: 1 !important;            
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        
        padding: 0.75rem 0.5rem !important;   
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        white-space: nowrap !important; 
        box-sizing: border-box !important;
        height: 2.875rem !important;        
        text-decoration: none !important;
    }
        
    /* 12px / 16 = 0.75rem */
    .type {
        margin: 0.75rem 0 !important;
    }
    
    /* 11px / 16 = 0.6875rem, 4px / 16 = 0.25rem, 10px / 16 = 0.625rem */
    .type .box {
        font-size: 0.6875rem !important;
        padding: 0.25rem 0.625rem !important;
        font-weight: 600 !important;
    }

    /* 21px / 16 = 1.3125rem, 16px / 16 = 1rem */
    #anns-title {
        font-size: 1.3125rem !important;
        line-height: 1.35 !important;
        margin: 0 0 1rem 0 !important;
        color: var(--text-main, #2d3436) !important;
    }

    /* 15.5px / 16 = 0.96875rem */
    .main-text {
        font-size: 0.96875rem !important;
        line-height: 1.6 !important;  
        color: #2d3748 !important;
    }

    /* 5. BILDGALLERIET */
    /* 30px / 16 = 1.875rem */
    #anns-gallery-wrapper {
        margin-top: 1.875rem !important;
    }
    
    /* 15px / 16 = 0.9375rem, 12px / 16 = 0.75rem */
    .gallery-title {
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* 8px / 16 = 0.5rem */
    .anns-gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    /* border-radius behålls i px */
    .anns-gallery-grid img {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important; 
        object-fit: cover !important;
        border-radius: 4px !important;
    }

    /* 6. FOOTERN (.foot) */
    /* 24px / 16 = 1.5rem, 25px / 16 = 1.5625rem, 15px / 16 = 0.9375rem */
    .foot {
        display: flex !important;
        flex-direction: column !important; 
        gap: 1.5rem !important;              
        width: 100% !important;
    }

    .foot > div {
        width: 100% !important;
        margin: 0 !important;            
    }

    /* 15px / 16 = 0.9375rem, 10px / 16 = 0.625rem */
    .foot h3 {
        font-size: 0.9375rem !important;
        margin-bottom: 0.625rem !important;
    }
    
    /* 6px / 16 = 0.375rem */
    .foot h3 .part {
        display: flex !important;
        align-items: center !important;
        gap: 0.375rem !important;
    }
    
    /* 20px / 16 = 1.25rem */
    .foot h3 svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    /* 14px / 16 = 0.875rem */
    .foot .anns-places, 
    .foot .links {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }
    
    /* 10px / 16 = 0.625rem, 13px / 16 = 0.8125rem */
    .report.link {
        margin: 0.625rem 0 0.625rem 0 !important;
        font-size: 0.8125rem !important;
        display: inline-block !important;
    }
    
    /* 120px / 16 = 7.5rem */
    .generated-svg
    {
        width: 7.5rem;
        height: 7.5rem;
    }

    /* 16px / 16 = 1rem */
    .bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        width: 100% !important;
    }
    
    /* 8px / 16 = 0.5rem */
    .bar .buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    /* 12px / 16 = 0.75rem, 4px / 16 = 0.25rem, 12.5px / 16 = 0.78125rem, 46px / 16 = 2.875rem */
    .bar .buttons a.tel,
    .bar .buttons button.email,
    .bar .buttons a.website {
        flex: 1 1 0% !important; 
        
        padding: 0.75rem 0.25rem !important;
        font-size: 0.78125rem !important;
        height: 2.875rem !important; 
    }
    
    /* 24px / 16 = 1.5rem */
    .foot {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }
    .foot > div {
        width: 100% !important;
        margin: 0 !important;
    }
    
    #anns-report-btn
    { float:right;}

    .nav-item-wrapper {
        display: block;
        width: 100%;
    }

    /* MOBIL-POPUPEN: Garanterar exakt marginal och responsivitet */
    /* 30px / 16 = 1.875rem, 25px / 16 = 1.5625rem, 15px / 16 = 0.9375rem. border-radius, box-shadow och max-width i px. */
    #loginBox, 
    #signUpBox {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        
        width: calc(100% - 1.875rem) !important;        
        padding: 1.5625rem 0.9375rem !important; 
        box-sizing: border-box !important; 
        
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    /* 12px / 16 = 0.75rem */
    .signUpForm {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .signUpForm input {
        width: 100% !important;
        grid-area: auto !important; 
    }
}
/* ==========================================================================
   MINI-BRYTPUNKTER (576px ned till 350px) - Konverterat till REM
   ========================================================================== */

@media (max-width: 576px) 
{
    /* 4px / 16 = 0.25rem */
    .pagination-nav { gap: 0.25rem; }
    
    /* 10px / 16 = 0.625rem, 12px / 16 = 0.75rem, 13px / 16 = 0.8125rem */
    .page-btn { padding: 0.625rem 0.75rem; font-size: 0.8125rem; }
}

@media (max-width: 500px) {
    /* 12px / 16 = 0.75rem, 16px / 16 = 1rem */
    .info-card {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }
    
    /* 24px / 16 = 1.5rem */
    .info-card .info-icon {
        font-size: 1.5rem !important;
        align-self: flex-start !important;
    }

    .email-table { background: none !important; padding: 0 !important; border: none; }
    
    /* 14px / 16 = 0.875rem, 10px / 16 = 0.625rem, 8px / 16 = 0.5rem. border och border-radius i px. */
    .email-table .email-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;    
        background: #ffffff !important;
        border: 1px solid var(--border-color, #e4e6eb) !important;
        border-radius: 8px !important;
        padding: 0.875rem !important;
        margin-bottom: 0.625rem !important;
        gap: 0.5rem !important;
    }
    
    /* 15px / 16 = 0.9375rem */
    .email-table .email-row .email-address {
        font-size: 0.9375rem !important;
        font-weight: 600 !important;
        color: var(--text-main, #2d3436) !important;
        word-break: break-all !important; 
    }
    
    /* 12px / 16 = 0.75rem, 4px / 16 = 0.25rem, 8px / 16 = 0.5rem */
    .email-table .email-row .badge {
        align-self: flex-start !important;
        font-size: 0.75rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* 4px / 16 = 0.25rem */
    .email-table .email-row .actions { width: 100% !important; margin-top: 0.25rem !important; }
    
    /* 10px / 16 = 0.625rem, 14px / 16 = 0.875rem. border och border-radius i px. */
    .email-table .email-row .btn-delete {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0.625rem !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        background-color: #fff5f5 !important;
        color: #e03131 !important;
        border: 1px solid #ffc9c9 !important;
        border-radius: 6px !important;
        cursor: pointer;
        height: auto !important;
    }

    .add-email-form .input-inline {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    /* 12px / 16 = 0.75rem */
    .add-email-form .input-inline input[type="email"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.75rem !important; 
    }
    
    /* 10px / 16 = 0.625rem */
    .add-email-form .input-inline div { margin-top: 0.625rem !important; width: 100% !important; }
    
    /* 12px / 16 = 0.75rem */
    .add-email-form .standard-button {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
    }
    
    .anns .bar .buttons {  flex-direction:column!important; }
    
    /* border-radius behålls i px för perfekta flikar */
    .button-group {
        flex-direction: column;
        label {
            margin-right: 0;
            margin-bottom: -1px;
            border-radius: 0 !important;
        }
        label:first-of-type { border-radius: 6px 6px 0 0 !important; }
        label:last-of-type { border-radius: 0 0 6px 6px !important; }
    }
    
    /* 15px / 16 = 0.9375rem, 10px / 16 = 0.625rem, 6px / 16 = 0.375rem */
    .ub-nav-wrapper { 
        flex-direction: column; 
        gap: 0.9375rem; 
        padding: 0.625rem 0px 0.375rem 0px !important;
    }
    
    #logos { margin: 0 auto; }

}

@media (max-width: 450px)
{
    /* 90px / 16 = 5.625rem */
    .generated svg { width: 5.625rem; height: 5.625rem; }

    /* 15px / 16 = 0.9375rem */
    .checkbox-textQ { padding-bottom: 0.9375rem; }
    
    /* 90px / 16 = 5.625rem */
    .anns-section .item .anns-logo-wrapper { width: 5.625rem; height: 5.625rem; }
    
    /* 15px / 16 = 0.9375rem */
    .edit .action-bar.box .p2 { padding-top: 0.9375rem; }
    
    /* 70px / 16 = 4.375rem, 16px / 16 = 1rem */
    .info-box-content { padding: 4.375rem 1rem 1rem 1rem; }
    
    /* 43px / 16 = 2.6875rem */
    .overlap-card .search-wrapper { height: 2.6875rem;}
    
    /* 10px / 16 = 0.625rem */
    .overlap-card .search-box { flex-direction: column; gap: 0.625rem;}
    
    /* 40px / 16 = 2.5rem */
    .list-topics-content .item img { width: 2.5rem;}

    .list-topics-content .item .headline { font-size: 0.9em;}
    
    /* 15px / 16 = 0.625rem, 35px / 16 = 2.1875rem */
    #ob #bar { grid-template-columns: 1fr; row-gap: 0.625rem; margin-top: 2.1875rem;}
}

@media (max-width: 400px)
{
    .segmented-control { width: auto; }
    
    /* 10px / 16 = 0.625rem */
    .ah { display: flex; gap: 0.625rem; margin-top: 0.625rem; flex-direction: column; }
    
    /* 14px / 16 = 0.875rem */
    .dashboard .content .grid { padding: 0.875rem !important; }
}

@media (max-width: 350px)
{
    #logos { display: none; }
    #logos2 { display: flex; }
    
    /* 25px / 16 = 1.5625rem, 6px / 16 = 0.375rem */
    .ub-nav-wrapper { 
        flex-direction: column; 
        gap: 1.5625rem; 
        padding: 0px 0px 0.375rem 0px !important; 
    }

    .error-page
    {
        .error-actions
        {
            flex-direction:column;
        }
    }
}