
/* ============================================
   GLOBAL BACKGROUNDS & LAYOUT WRAPPER
   ============================================ */

/* Outer Background Frame: Sets the dark grey edges on the far left and right sides */
html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #d1d5db; /* Dark grey outer canvas */
    font-family: Arial, sans-serif;
    overflow-y: auto;
}

/* Headline and subtitle */
.main-title, .sub-title {
    color: #2e7d32 !important;
    margin-top: 0;
    font-size: 28px;
}

.sub-title {
    color: #2e7d32 !important;
    margin-top: 25px;
    font-size: 22px;
    margin-bottom: 15px;
}

/* Inner Content Box: Light grey center box containing main content */
.main-container {
    background-color: #f3f4f6;  /* Lighter grey box background */
    width: 100%;               
    max-width: 1000px;         /* Caps width so dark grey shows on wide monitors */
    min-height: 100vh;         
    height: auto;
    margin: 0 auto;            /* Centers the entire page content perfectly */
    box-sizing: border-box;
    padding: 20px;             
    display: flex;
    flex-direction: column;    
}

/* Side-by-Side Flex Box Section Container */
.media-section {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; 
    align-items: stretch;     
    gap: 20px;
    width: 100%;
    position: relative; 
    margin-bottom: 20px;
    min-height: 1010px !important;
    height: 1010px !important;    
}

/* Left Sidebar Layout Adjustments */
.thumbnail-sidebar {
    width: 243px;  
    min-width: 243px;         
    flex-shrink: 0;         
    display: flex;
    flex-direction: column;
    height: auto;
}

/* The 11-Row Grid Frame */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 6px;
    margin-top: 10px;
}

.grid-container img {
    width: 75px !important;    
    height: 75px !important;   
    display: block;
    border: none !important; 
    border-radius: 10px;
    /*vertical-align: middle; */
}

/* The top bar wrapper holding your navigation actions */
nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;            /* Perfectly centers the text counter vertically */
    margin-bottom: 2px;    
    width: 100% !important;         /* Matches the exact width of the image grid */
    box-sizing: border-box;
}

/* Styled navigation action buttons */
.nav-btn {
    padding: 6px 4px;
    font-size: 14px;
    font-weight: bold;
    color: #4b5563;
    background-color: #e5e7eb;        /* Light gray base style */
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Hover State: Lights up your signature dark trail green color */
.nav-btn:hover {
    background-color: #2e7d32 !important; 
    color: #ffffff !important;
    border-color: #1b5e20;
}

/* Style for the central dynamic text image range counter element */
.counter-display {
    font-size: 14px;
    font-weight: 900 !important;
    color: #2e7d32;                   /* Beautiful matching green text */
}


/* Text Links Underneath The Grid Elements */
.sidebar-footer-links {
    margin-top: 8px;      /* Generates clean separation below the grid floor */
    text-align: center;
    font-size: 14px;
    color: #4b5563;
}

.sidebar-footer-links a {
    color: #1e3a8a;
    text-decoration: underline;
}

/* The Leaflet Map: Stretches perfectly to stay flush with the sidebar height */
#map {
    flex-grow: 1;           
    height: 100% !important;
    min-height: 964px !important;
    max-height: 964px !important; /* Forces hard visual crop to match media-section precisely */
    display: block !important;
    border: 1px solid #9ca3af;
}

/* ================
    Language part
   ================ */

/* Container til knapperne */
.lang-switcher {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}

/* Language buttons */
.lang-btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: bold;
    color: #4b5563;
    background-color: #e5e7eb;        /* Light gray base style */
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Aktiv knap (Valgt sprog) */
.lang-btn.active {
    background-color: #2e7d32 !important; 
    color: #ffffff !important;
    border-color: #1b5e20;
}

/* Hover-effekt på knapperne */
.lang-btn:hover {
    background-color: #2e7d32 !important; 
    color: #ffffff !important;
    border-color: #1b5e20;
}

/* Sikrer at punktopstillingerne altid har prikker og luft, selvom temaet nulstiller dem */
.photo-instructions {
  list-style-type: disc !important;
  margin-left: 0px !important;
  padding-left: 20px !important;
  margin-bottom: 16px;
}

/* Skaber luft/afstand MELLEM hvert punkt i listen */
.photo-instructions li {
  margin-bottom: 10px !important; /* Juster dette tal op/ned for mere eller mindre luft */
}

/* Bruges til dynamisk at skjule den engelske eller danske sektion */
.lang-section.hidden {
  display: none;
}


/* ========================================================================
   MOBILE OPTIMIZATION (Activates ONLY on real phones with touch screen)
   ======================================================================== */
@media (max-width: 480px) and (pointer: coarse) {
    
    /* Unlucks the fixed width so the page fills the mobile screen */
    .main-container {
        min-width: 100% !important;
        padding: 10px; 
    }

    .media-section {
        min-height: auto !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;        /* Forces the container to stay on the screen */
        max-width: 100% !important;    /* Prevents it from going to the right */
        box-sizing: border-box !important;
    }

    /* Forces map and pictures to fill out the width on the screen */
    .thumbnail-sidebar, #map {
        width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Lowering the height of the map for phone screens */
    #map {
        max-width: 100% !important;
        height: 450px !important;    
        min-height: 450px !important;
        max-height: 450px !important;
        box-sizing: border-box !important;
    }

    /* Make room for 4 images in the width and center the section */
    .grid-container {
        grid-template-columns: repeat(4, 75px) !important; 
        justify-content: center; 
        gap: 8px !important;     
    }

    /* ===============================================================
       The text intro image: make it align with the text on phones
       =============================================================== */
    .top-content img {
        float: none !important;      /* Resetting the original float: right */
        display: block !important;   /* Forces the image to stay on its own line */
        margin-left: 0 !important;   /* Put the image's left edge all the way out to the text edge */
        margin-right: 0 !important;
        margin-top: 15px !important; /* Keeps space up to headline */
        margin-bottom: 25px !important; /* Keeps space down to the text */        
        max-width: 100% !important;  /* Making sure the image scales with the mobile screen */
        height: auto !important;     
    }

    .bottom-nav {
        display: none !important;
    }

}