/*
Theme Name: Leksaks Tema 1.1
Theme URI: https://sweirc.net/
Author: Andreas
Description: Skräddarsytt tema för Eslövs Leksaksmuseum med mörkt/ljust tema.
Version: 1.1
Text Domain: eslovs-leksaksmuseum
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Copyright (c) 2022 SweIRC.net
License: GPLv2
*/

/* ==========================================================================
   1. NOLLSTÄLLNING OCH GRUNDSTIL
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

html, body {
    height: 100%;
}

body {
    background-color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Fix mot suddig text vid hovring på animerade kort och bilder */
.info-card, .collection-card, .gallery-item {
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* ==========================================================================
   2. BANNER OCH EMBLÉM (HERO-SECTION)
   ========================================================================== */
.hero-section { 
    width: 100%; 
    height: 220px; 
    overflow: hidden; 
    background-color: #1a1a1a; 
    flex-shrink: 0; 
    transition: height 0.2s ease;
    position: relative;
    text-align: center;
}

.banner-img { 
    width: 100%; 
    height: 100%; 
    display: block; 
    object-fit: cover; 
    object-position: center 32%; 
}

.banner-badge-link {
    position: absolute;
    right: 40px;          
    top: 50%;             
    transform: translateY(-50%); 
    width: 200px;         
    height: 100px;        
    display: block;
    z-index: 10;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.badge-img {
    width: 100%;
    height: 100%;
    object-fit: contain;  
    display: block;
}

.banner-badge-link:hover {
    transform: translateY(-54%) scale(1.03); 
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); 
}

/* Centerad textrubrik inuti själva bannern */
.hero-title-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 900px;
    z-index: 3;
    pointer-events: none;
}

.hero-page-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* Anpassning för ultrawide-skärmar */
@media (min-width: 1600px) { .hero-section { height: 220px; } }
@media (min-width: 2000px) { .hero-section { height: 350px; } }
@media (min-width: 2800px) { .hero-section { height: 400px; } }
@media (min-width: 3000px) { .hero-section { height: 600px; } }
@media (min-width: 3900px) { .hero-section { height: 800px; } }

/* ==========================================================================
   3. MENYRAD, STICKY NAVIGERING & KNAPPAR
   ========================================================================== */
.nav-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 14px 24px;
    position: relative;
    width: 100%;
}

.menu-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 0 auto;
}

.menu-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
    align-items: center;
}

.menu-links ul li {
    margin: 0;
    padding: 0;
}

.menu-links ul li a,
.nav-link {
    text-decoration: none;
    color: #4b5563; 
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 6px; 
    background-color: transparent;
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap; 
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.menu-links ul li a::after,
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #1a1a1a;
    transition: all 0.2s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.menu-links ul li a:hover,
.nav-link:hover {
    background-color: #e2e8f0; 
    color: #000000;            
    transform: translateY(-1px); 
}

.menu-links ul li a:hover::after,
.nav-link:hover::after { 
    width: 40%; 
}

/* Aktiv sida (Inverterad knappstil) */
.menu-links ul li.current-menu-item a,
.menu-links ul li.current_page_item a,
.menu-links a.active,
.nav-link.active {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
    transform: none;
}
.menu-links ul li.current-menu-item a::after,
.menu-links ul li.current_page_item a::after,
.nav-link.active::after {
    display: none;
}

.nav-icon {
    width: 18px;          
    height: 18px;
    flex-shrink: 0;       
}

/* Mobilknappar (Hamburgare & Ljust/Mörkt läge) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #4b5563;
    z-index: 110;
}
.hamburger-btn svg { 
    width: 24px; 
    height: 24px; 
    fill: none; 
    stroke: currentColor; 
    stroke-width: 2; 
    stroke-linecap: round; 
}

.theme-toggle-btn {
    position: absolute;
    right: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    z-index: 110;
}
.theme-toggle-btn:hover { background-color: #e2e8f0; }

.theme-toggle-btn svg { 
    width: 20px; 
    height: 20px; 
    fill: none; 
    stroke: currentColor; 
    stroke-width: 2; 
    stroke-linecap: round; 
    stroke-linejoin: round; 
}

.sun-icon { display: none; color: #fbbf24; }
.moon-icon { display: block; color: #4b5563; }
/* ==========================================================================
   4. 🌟 GLOBAL SYNKRONISERING AV ALLA SIDSMALLAR (RUBRIKHÖJDER)
   ========================================================================== */
/* Tvingar alla olika sidsmallar till exakt samma bekväma grundbredd och andning */
.main-content,
.gallery-page-content,
.collections-page-content,
.front-page-container,
.page-template-default .main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px !important;
    flex-grow: 1;
}

/* Rensar gamla dolda WP-marginaler och lägger ALLA H1-rubriker på samma perfekta linje */
.main-content h1,
.gallery-page-content h1,
.collections-page-content h1,
.page .main-content h1:first-of-type,
.page-template-default .main-content h1 {
    margin-top: 10px !important;
    padding-top: 0 !important;
    margin-bottom: 25px !important;
    color: #111111;
    display: block !important;
}

/* Justering för Startsidan så att den matchar standardsidorna på millimetern */
.welcome-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 10px !important;
}
.welcome-intro h1 {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* Snygga rad- och styckeavstånd inuti texter på samlingar och artiklar */
.collections-page-content br {
    display: block !important;
    content: "" !important;
    margin-top: 15px !important;
}
.collections-page-content p {
    margin-bottom: 20px !important;
    line-height: 1.6;
}

/* Allmän text- och underrubrikstil */
.main-content h2 { color: #111111; font-size: 1.6rem; font-weight: 700; margin-top: 40px; margin-bottom: 20px; }
.main-content p { color: #4a4a4a; }
.lead-text { font-size: 1.2rem; color: #666; margin-bottom: 35px; }

/* ==========================================================================
   5. INFOBUTOR, ÖPPETTIDER & PRISER
   ========================================================================== */
.extra-box { background-color: #f0fdf4; border-left: 4px solid #4ade80; padding: 16px 20px; border-radius: 4px; margin-bottom: 20px; font-size: 1.05rem; color: #14532d; }
.extra-box ul { margin-top: 8px; margin-left: 20px; }
.alert-box { background-color: #fff5f5; border-left: 4px solid #f87171; padding: 16px 20px; border-radius: 4px; margin-bottom: 35px; font-size: 1.05rem; color: #991b1b; }

.hours-table { width: 100%; border-collapse: collapse; font-size: 1.1rem; }
.hours-row { border-bottom: 1px solid #f3f4f6; }
.hours-row:last-child { border-bottom: 2px solid #1a1a1a; }
.hours-day { padding: 14px 0; font-weight: 600; color: #1a1a1a; width: 40%; }
.hours-time { padding: 14px 0; color: #4b5563; text-align: right; }

.price-list { list-style: none; font-size: 1.1rem; }
.price-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #e5e7eb; }
.price-name { color: #4b5563; }
.price-value { font-weight: 700; color: #1a1a1a; }

/* ==========================================================================
   6. STARTSIDANS HIGHLIGHTS & SIFFER-GRID
   ========================================================================== */
.info-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-bottom: 40px; }
.info-card { background-color: #ffffff; border: 1px solid #eaeaea; border-radius: 12px; padding: 25px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07); }
.card-icon-wrapper { width: 44px; height: 44px; background-color: #f1f5f9; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; color: #0284c7; }
.card-icon-wrapper svg { width: 24px; height: 24px; }
.info-card h3 { font-size: 1.15rem; margin-top: 0; margin-bottom: 10px; color: #1a1a1a; }
.info-card p { font-size: 0.95rem; color: #4b5563; line-height: 1.5; margin: 0; }

.info-card p a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.2s ease, text-decoration-color 0.2s ease; }
.info-card p a:hover { color: #0284c7; text-decoration-color: #0284c7; }

.museum-highlights-box { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border: 1px solid #e2e8f0; border-radius: 16px; padding: 35px; margin-bottom: 30px; }
.museum-highlights-box h2 { margin-top: 0; color: #0f172a; font-size: 1.6rem; text-align: center; }
.highlights-desc { text-align: center; color: #475569; max-width: 650px; margin: 0 auto 30px auto; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-item, .stats-item { background-color: #ffffff; border-radius: 10px; padding: 20px; text-align: center; border: 1px solid #e2e8f0; }
.stat-number { display: block; font-size: 1.8rem; font-weight: 700; color: #0284c7; margin-bottom: 5px; }
.stat-label { font-size: 0.85rem; color: #4b5563; line-height: 1.3; }

.sub-collections-text { border-top: 1px solid #cbd5e1; padding-top: 20px; }
.sub-collections-text p { font-size: 0.95rem; color: #334155; line-height: 1.6; margin-bottom: 12px; }
.welcome-footer-note { text-align: center; margin-top: 20px; }
.welcome-footer-note h3 { font-size: 1.4rem; color: #0f172a; }
/* ==========================================================================
   7. DESIGN FÖR SAMLINGAR (KATEGORIKORT & UNDERMENY)
   ========================================================================== */
.collections-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
    margin-top: 40px; 
    margin-bottom: 40px; 
}

.collection-card { 
    background-color: #ffffff; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    border: 1px solid #eaeaea; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; 
    display: flex; 
    flex-direction: column; 
}

.card-image-box { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background-color: #f1f5f9; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.25rem; color: #1a1a1a; }
.card-content p { margin: 0; font-size: 0.95rem; color: #4b5563; line-height: 1.5; }

.collection-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1); border-color: #1a1a1a; }
.collection-card:hover .card-img { transform: scale(1.04); }

.collections-sub-nav { background-color: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 15px 20px; margin: 25px 0 40px 0; display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; }
.sub-nav-title { font-weight: 600; font-size: 0.95rem; color: #475569; }
.collections-sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.collections-sub-nav ul li a { display: inline-block; padding: 6px 14px; background-color: #ffffff; border: 1px solid #cbd5e1; border-radius: 6px; color: #334155; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease; }
.collections-sub-nav ul li a:hover, .collections-sub-nav ul li.current-menu-item a { background-color: #0284c7; border-color: #0284c7; color: #ffffff; transform: translateY(-1px); }

/* ==========================================================================
   8. UNIK DESIGN FÖR KONTAKTSIDAN & KARTA
   ========================================================================== */
.contact-grid { display: flex; flex-direction: column; gap: 40px; margin-top: 20px; }
.contact-info-block { background-color: #f8fafc; padding: 25px; border-radius: 8px; border-left: 4px solid #1a1a1a; }
.info-item { margin-bottom: 15px; }
.info-item:last-child { margin-bottom: 0; }
.info-label { font-weight: 700; display: block; color: #1a1a1a; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-size: 1.1rem; color: #4b5563; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-weight: 600; font-size: 1rem; }
.form-input, .form-textarea { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-family: inherit; font-size: 1rem; background-color: #ffffff; color: #1a1a1a; transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: #1a1a1a; }
.form-textarea { resize: vertical; min-height: 120px; }
.submit-btn { background-color: #1a1a1a; color: #ffffff; border: none; padding: 14px 24px; font-size: 1rem; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; align-self: flex-start; }
.submit-btn:hover { background-color: #000000; transform: translateY(-1px); }

.map-wrapper { margin-top: 25px; margin-bottom: 30px; }
.map-responsive-container { position: relative; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); border: 1px solid #e2e8f0; }
.map-info-box { background-color: #ffffff; border: 1px solid #eaeaea; border-radius: 12px; padding: 25px; margin-top: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); }
.map-info-box h3 { margin-top: 0; margin-bottom: 10px; font-size: 1.2rem; }
.map-info-box p { margin: 0; line-height: 1.6; color: #4b5563; }

/* ==========================================================================
   9. MODELLJÄRNVÄG-RASTER VS. WORDPRESS [GALLERY] KORTKOD
   ========================================================================== */
/* Det unika bildgalleri-rastret för modelljärnvägssidan */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 35px; margin-bottom: 40px; }
.gallery-grid .gallery-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); background-color: #f1f5f9; border: 1px solid #eaeaea; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.gallery-grid .gallery-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-grid .gallery-item:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); border-color: #1a1a1a; }
.gallery-grid .gallery-item:hover .gallery-img { transform: scale(1.05); }

/* Det inbyggda WordPress-galleriet [gallery] kortkod */
.gallery { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 16px !important; margin: 20px 0 !important; padding: 0 !important; list-style: none !important; }
.gallery[class*="gallery-columns-"], .gallery.gallery-columns-1, .gallery.gallery-columns-2, .gallery.gallery-columns-3, .gallery.gallery-columns-4 { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 16px !important; }
.gallery-item { margin: 0 !important; padding: 0 !important; overflow: hidden !important; border-radius: 8px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; transition: transform 0.2s ease !important; height: max-content !important; max-width: 100% !important; width: 100% !important; }
.gallery-item:hover { transform: translateY(-3px) !important; }
.gallery-item dt { display: block !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }
.gallery-item img, .gallery-icon img { width: 100% !important; height: 200px !important; object-fit: cover !important; display: block !important; cursor: pointer !important; }
.gallery-caption, .wp-caption-text, .gallery-item dd { display: none !important; margin: 0 !important; padding: 0 !important; height: 0 !important; line-height: 0 !important; }
.gallery br, .gallery-item + br { display: none !important; clear: none !important; content: "" !important; }
/* ==========================================================================
   10. LIGHTBOX MED JAVASCRIPT-ZOOM (FÖR ALLA GALLERIER)
   ========================================================================== */
#lightbox { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.95); 
    display: none; 
    z-index: 2000; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 20px; 
    overflow-y: auto !important; 
}

#lightbox.open { 
    display: flex !important; 
    opacity: 1 !important; 
}

#lightbox.is-zoomed { 
    justify-content: flex-start !important; 
}

.lightbox-nav-box { 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    width: 100%; 
    max-width: 85%; 
    height: auto !important; 
}

#lightbox-img { 
    max-width: 100%; 
    max-height: 70vh !important; 
    border-radius: 4px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    transition: width 0.2s ease, max-height 0.2s ease; 
    object-fit: contain; 
    margin: 0 auto; 
    display: block; 
    cursor: zoom-in; 
}

#lightbox-img.zoomed { 
    cursor: zoom-out; 
    max-height: none !important; 
    max-width: none !important; 
    width: 130% !important; 
    height: auto !important; 
    margin: 60px auto 40px auto !important; 
}

#lightbox-caption { 
    margin-top: 20px; 
    color: #ffffff; 
    font-size: 1.1rem; 
    font-weight: 500; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); 
    letter-spacing: 0.5px; 
    text-align: center; 
    width: 100%; 
    max-width: 600px; 
    word-wrap: break-word; 
}

#lightbox.is-zoomed #lightbox-caption { 
    display: none !important; 
}

.lightbox-btn, #lightbox-close { 
    position: fixed; 
    background: none; 
    border: none; 
    color: #ffffff; 
    font-size: 2.5rem; 
    cursor: pointer; 
    padding: 10px; 
    z-index: 2100; 
    opacity: 0.7; 
    transition: opacity 0.2s; 
    user-select: none; 
}

.lightbox-btn:hover, #lightbox-close:hover { 
    opacity: 1; 
}

#lightbox-close { 
    top: 20px; 
    right: 25px; 
    font-size: 3rem; 
    line-height: 1; 
}

#lightbox-prev { 
    left: 30px; 
    top: 50%; 
    transform: translateY(-50%); 
}

#lightbox-next { 
    right: 30px; 
    top: 50%; 
    transform: translateY(-50%); 
}
/* ==========================================================================
   11. ANIMATION FÖR EMBLEM (TÅGET SOM KÖR ÖVER SKÄRMEN)
   ========================================================================== */
.badge-run-animation { 
    animation: driveAcross 10s linear forwards; 
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: crisp-edges; 
}

.badge-run-animation:hover { 
    transform: translateY(-50%) !important; 
    filter: none !important; 
}

@keyframes driveAcross {
    0% { opacity: 1; transform: translateY(-50%) scale(1); }
    3% { opacity: 0; transform: translateY(-50%) scale(0.5); }
    4% { opacity: 0; left: -250px; top: 50%; transform: translateY(-50%); }
    5% { opacity: 1; left: -250px; top: 50%; transform: translateY(-50%); }
    93% { opacity: 1; left: calc(100% + 250px); top: 50%; transform: translateY(-50%); }
    94% { opacity: 0; left: calc(100% + 250px); top: 50%; transform: translateY(-50%); }
    96% { opacity: 0; left: auto; right: 40px; top: 50%; transform: translateY(-50%) scale(0.5); }
    100% { opacity: 1; left: auto; right: 40px; top: 50%; transform: translateY(-50%) scale(1); }
}

/* Rökringar till skorstenen */
.smoke-ring { 
    position: absolute; 
    top: 5px; 
    left: 142px; 
    width: 10px; 
    height: 6px; 
    background-color: rgba(220, 220, 220, 0.6); 
    border-radius: 50%; 
    opacity: 0; 
    z-index: 5; 
    pointer-events: none; 
}

.badge-run-animation .smoke-ring { animation: puff 1.8s ease-out infinite; }
.badge-run-animation .smoke-2 { animation-delay: 0.5s; }
.badge-run-animation .smoke-3 { animation-delay: 1.1s; }

@keyframes puff {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    15% { opacity: 0.7; }
    100% { opacity: 0; transform: translate(-70px, -50px) scale(3.5); filter: blur(3px); }
}

/* Blinkande tipsbubbla */
.click-hint { 
    position: absolute; 
    left: -110px; 
    top: 50%; 
    transform: translateY(-50%); 
    background-color: #1a1a1a; 
    color: #ffffff; 
    padding: 6px 12px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    border-radius: 20px; 
    white-space: nowrap; 
    opacity: 0; 
    pointer-events: none; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    animation: hintTimer 60s infinite; 
}

.badge-run-animation .click-hint { 
    animation: none !important; 
    opacity: 0 !important; 
}

@keyframes hintTimer {
    0%, 90% { opacity: 0; transform: translateY(-50%) scale(0.9); }
    92% { opacity: 1; transform: translateY(-50%) scale(1); }
    93%, 95%, 97% { opacity: 0.2; }
    94%, 96%, 98% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-50%) scale(0.9); }
}

/* Base-sidfot */
.site-footer { 
    background-color: #ffffff; 
    border-top: 1px solid #eaeaea; 
    padding: 24px 0; 
    margin-top: 60px; 
    transition: background-color 0.3s ease; 
}

.footer-container { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 0 24px; 
    display: flex; 
    justify-content: flex-end; 
}

.footer-text { color: #888888; }
/* ==========================================================================
   12. 🌙 MÖRKT TEMA (GLOBAL EXKLUSIV)
   ========================================================================== */
html.dark-theme body { background-color: #121212; color: #f3f4f6; }
html.dark-theme .nav-bar { background-color: #1c1c1c; border-bottom: 1px solid #2d2d2d; }
html.dark-theme .menu-links ul li a, html.dark-theme .nav-link { color: #9ca3af; }
html.dark-theme .menu-links ul li a::after, html.dark-theme .nav-link::after { background-color: #f1f5f9; }
html.dark-theme .menu-links ul li a:hover, html.dark-theme .nav-link:hover { background-color: #27272a; color: #ffffff; }
html.dark-theme .menu-links ul li.current-menu-item a, html.dark-theme .menu-links ul li.current_page_item a, html.dark-theme .menu-links a.active { background-color: #f1f5f9 !important; color: #1a1a1a !important; }
html.dark-theme .hamburger-btn { color: #9ca3af; }
html.dark-theme .theme-toggle-btn:hover { background-color: #27272a; }
html.dark-theme .moon-icon { display: none; }
html.dark-theme .sun-icon { display: block; }
html.dark-theme .main-content h1, html.dark-theme .main-content h2, html.dark-theme .gallery-page-content h1, html.dark-theme .collections-page-content h1, html.dark-theme .welcome-intro h1 { color: #ffffff; }
html.dark-theme .lead-text, html.dark-theme .main-content p { color: #9ca3af; }
html.dark-theme .site-footer { background-color: #1c1c1c; border-top: 1px solid #2d2d2d; }
html.dark-theme .footer-text { color: #6b7280; }

html.dark-theme .extra-box { background-color: #142e1d; border-left: 4px solid #22c55e; color: #bbf7d0; }
html.dark-theme .alert-box { background-color: #3b1818; border-left: 4px solid #ef4444; color: #fecaca; }
html.dark-theme .hours-row { border-bottom: 1px solid #2d2d2d; }
html.dark-theme .hours-row:last-child { border-bottom: 2px solid #ffffff; }
html.dark-theme .hours-day { color: #ffffff; }
html.dark-theme .hours-time, html.dark-theme .price-name { color: #9ca3af; }
html.dark-theme .price-item { border-bottom: 1px dashed #2d2d2d; }
html.dark-theme .price-value { color: #ffffff; }

html.dark-theme .contact-info-block { background-color: #1e1e1e; border-left: 4px solid #ffffff; }
html.dark-theme .info-label { color: #ffffff; }
html.dark-theme .info-value { color: #9ca3af; }
html.dark-theme .form-input, html.dark-theme .form-textarea { background-color: #1c1c1c; border-color: #374151; color: #ffffff; }
html.dark-theme .form-input:focus, html.dark-theme .form-textarea:focus { border-color: #ffffff; }
html.dark-theme .submit-btn { background-color: #ffffff; color: #121212; }
html.dark-theme .submit-btn:hover { background-color: #f3f4f6; }

html.dark-theme .gallery-item { background-color: #1e1e1e; border-color: #2d2d2d; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
html.dark-theme .gallery-grid .gallery-item:hover { border-color: #ffffff; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); }
html.dark-theme .collection-card { background-color: #1e1e1e; border-color: #2c2c2c; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); }
html.dark-theme .card-content h3 { color: #ffffff; }
html.dark-theme .card-content p { color: #9ca3af; }
html.dark-theme .collection-card:hover { border-color: #ffffff; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }

html.dark-theme .info-card { background-color: #1e1e1e; border-color: #2c2c2c; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
html.dark-theme .card-icon-wrapper { background-color: #2a2a2a; color: #38bdf8; }
html.dark-theme .info-card h3 { color: #ffffff; }
html.dark-theme .info-card p { color: #9ca3af; }
html.dark-theme .info-card p a:hover { color: #38bdf8; text-decoration-color: #38bdf8; }
html.dark-theme .museum-highlights-box { background: linear-gradient(135deg, #1a1a1a 0%, #161616 100%); border-color: #2c2c2c; }
html.dark-theme .museum-highlights-box h2 { color: #ffffff; }
html.dark-theme .highlights-desc { color: #94a3b8; }
html.dark-theme .stat-item, html.dark-theme .stats-item { background-color: #242424; border-color: #333333; }
html.dark-theme .stat-number { color: #38bdf8; }
html.dark-theme .stat-label { color: #9ca3af; }
html.dark-theme .sub-collections-text { border-top-color: #333333; }
html.dark-theme .sub-collections-text p { color: #cbd5e1; }
html.dark-theme .welcome-footer-note h3 { color: #ffffff; }
html.dark-theme .map-responsive-container { border-color: #2c2c2c; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25); }
html.dark-theme .map-info-box { background-color: #1e1e1e; border-color: #2c2c2c; }
html.dark-theme .map-info-box p { color: #9ca3af; }
html.dark-theme .collections-sub-nav { background-color: #1a1a1a; border-color: #2c2c2c; }
html.dark-theme .sub-nav-title { color: #94a3b8; }
html.dark-theme .collections-sub-nav ul li a { background-color: #242424; border-color: #333333; color: #cbd5e1; }
html.dark-theme .collections-sub-nav ul li a:hover, html.dark-theme .collections-sub-nav ul li.current-menu-item a { background-color: #38bdf8; border-color: #38bdf8; color: #1a1a1a; }

/* ==========================================================================
   13. 📱 RESPONSIVITET & MOBILER (UNDER 1000PX SKÄRMBREDD)
   ========================================================================== */
@media (max-width: 1000px) {
    .hero-section { height: 200px; }
    .banner-img { object-position: center center; transform: scale(1.25); transform-origin: center center; }
    .banner-badge-link { right: 12px; top: 70%; transform: translateY(-50%); width: 90px; height: 45px; }

    .nav-container { justify-content: space-between; flex-direction: row; padding: 10px 20px; }
    .hamburger-btn { display: block; } 
    .theme-toggle-btn { position: static; } 

    .menu-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: #ffffff; border-bottom: 1px solid #eaeaea; flex-direction: column; gap: 0; padding: 10px 0; box-shadow: 0 4px 10px rgba(0,0,0,0.05); z-index: 100; }
    .menu-links.open, .menu-links.active { display: block; }
    .menu-links ul { flex-direction: column; width: 100%; gap: 0; }
    .menu-links ul li { width: 100%; text-align: center; }
    .menu-links ul li a { display: block; padding: 12px; border-bottom: 1px solid rgba(0,0,0,0.05); width: 100%; }
    html.dark-theme .menu-links ul li a { border-bottom-color: rgba(255,255,255,0.05); }

    .nav-link { width: 100%; text-align: center; padding: 14px 0; border-radius: 0; }
    .nav-link::after { display: none; } 
    .nav-link:hover { transform: none; background-color: #e2e8f0; }
    
    .main-content, .gallery-page-content, .collections-page-content, .front-page-container { padding: 35px 20px; }
    .main-content h1, .gallery-page-content h1, .collections-page-content h1, .welcome-intro h1 { font-size: 2rem; margin-top: 10px !important; }
    .footer-container { justify-content: center; }
    .hours-table, .price-list { font-size: 1rem; }

    /* Lokets animation på mobil */
    .badge-run-animation { animation: driveAcross 10s linear forwards; }
    @keyframes driveAcross {
        0% { opacity: 1; transform: translateY(-50%) scale(1); }
        3% { opacity: 0; transform: translateY(-50%) scale(0.5); }
        4% { opacity: 0; left: -150px; top: 70%; transform: translateY(-50%); }
        5% { opacity: 1; left: -150px; top: 70%; transform: translateY(-50%); }
        93% { opacity: 1; left: calc(100% + 150px); top: 70%; transform: translateY(-50%); }
        94% { opacity: 0; left: calc(100% + 150px); top: 70%; transform: translateY(-50%); }
        96% { opacity: 0; left: auto; right: 12px; top: 70%; transform: translateY(-50%) scale(0.5); }
        100% { opacity: 1; left: auto; right: 12px; top: 70%; transform: translateY(-50%) scale(1); }
    }
    .smoke-ring { top: 2px; left: 64px; width: 6px; height: 4px; }
    .click-hint { left: -95px; top: 70%; padding: 4px 10px; font-size: 0.75rem; }
}

@media (max-width: 1024px) {
    .gallery, .gallery[class*="gallery-columns-"] { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 950px) {
    .collections-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 900px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .info-cards-grid, .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    .museum-highlights-box { padding: 20px; }
}

@media (max-width: 768px) {
    .hero-page-title { font-size: 1.5rem; }
}

@media (max-width: 600px) {
    .gallery { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; padding: 0 4px !important; }
    .gallery[class*="gallery-columns-"] { grid-template-columns: repeat(2, 1fr) !important; }
    .gallery-item img, .gallery-icon img { height: 140px !important; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .collections-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 380px) {
    .gallery, .gallery[class*="gallery-columns-"] { grid-template-columns: 1fr !important; }
    .gallery-item img, .gallery-icon img { height: 200px !important; }
}

/* ==========================================================================
   SLUTGILTIG KORRIGERING: FIX FÖR BANNERTEXT & STARTSIDAN
   ========================================================================== */

/* 1. 🌟 FIX FÖR OSYNLIG BANNERTEXT I MÖRKT LÄGE */
html.dark-theme .hero-page-title {
    color: #ffffff !important; /* Tvingar texten inuti din banner att bli helt vit i mörkt läge */
}

/* 2. 🌟 SYNKRONISERING AV STARTSIDANS HÖJD */
.welcome-intro {
    padding-top: 0 !important; /* Tar bort det extra hoppet så att startsidan hamnar på exakt samma linje som de andra */
}

/* ==========================================================================
   BERGSÄKER FIX FÖR ALLA H1-RUBRIKER I MÖRKT LÄGE
   ========================================================================== */

/* Tvingar ALLA h1-rubriker på hela webbplatsen att bli vita i mörkt läge */
html.dark-theme h1,
html.dark-theme .hero-page-title,
html.dark-theme .main-content h1,
html.dark-theme .gallery-page-content h1,
html.dark-theme .collections-page-content h1,
html.dark-theme .front-page-container h1,
html.dark-theme .welcome-intro h1 {
    color: #ffffff !important;
}

/* ==========================================================================
   ÅTERSTÄLLNING AV DIN URSPRUNGLIGA TEXTSKUGGA PÅ BILDTEXTERNA
   ========================================================================== */
#lightbox-caption {
    /* 🌟 Återställer dina exakta dubbla skuggor: grå mjuk skugga + vitt sken */
    text-shadow: 2px 2px 4px rgba(100, 100, 100, 0.6), 0 0 12px rgba(255, 255, 255, 0.4) !important;
}
