/* ============================================= */
/* 1. Globala stilar & CSS Reset                 */
/* ============================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* ============================================= */
/* 2. Huvudlayout & Typografi                    */
/* ============================================= */
.container {
    background-color: #ffffff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
    margin: 1rem;
}
h1 { color: #1c1e21; margin-bottom: 1em; }
h2 { color: #34495e; border-bottom: 2px solid #e0e0e0; padding-bottom: 10px; margin-top: 40px; }
p { line-height: 1.6; font-size: 1.1em; color: #555; }
a { color: #007bff; }

/* ============================================= */
/* 3. Komponenter (Index-sidan)                  */
/* ============================================= */
.header-logo { max-width: 300px; margin-bottom: 20px; }
.image-showcase { width: 100%; max-width: 600px; margin: 20px auto; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.steps-container { display: flex; flex-direction: column; align-items: center; margin-top: 30px; }
.step { padding: 20px; min-width: 250px; max-width: 500px; }
.step h3 { font-size: 1.8em; color: #2980b9; }
.step p { font-size: 1em; margin-top: 5px; }
.benefits-list { list-style-type: none; padding: 0; margin-top: 20px; text-align: left; display: inline-block; }
.benefits-list li { font-size: 1.1em; margin-bottom: 12px; position: relative; padding-left: 30px; }
.benefits-list li::before { content: '✔'; color: #84a07c; font-weight: bold; position: absolute; left: 0; }
.cta-button { display: inline-block; background-color: #84a07c; color: #fff; padding: 15px 30px; font-size: 1.2em; font-weight: bold; text-decoration: none; border-radius: 5px; margin-top: 30px; transition: background-color 0.3s ease, transform 0.2s ease; }
.cta-button:hover { background-color: #6a8262; transform: scale(1.05); }

/* ============================================= */
/* 4. Sida: Hålsida (`hole_page.html`)           */
/* ============================================= */
.image-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1280 / 1024;
}

/* --- KORRIGERING: Tvingar bilden till det understa lagret --- */
.hole-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    z-index: 1; /* Lägsta lagret */
}

.status-message, .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.status-message {
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    z-index: 100; /* Högsta lagret (tillsammans med spinner) */
}
.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
    display: none;
    z-index: 101; /* Allra högst, om den behöver synas över ett meddelande */
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.logo-overlay {
    position: absolute;
    height: auto;
    opacity: 0.8;
    pointer-events: none;
    z-index: 50; /* Mellersta lagret: över bilden, under meddelanden */
}
.logo-top-left {
    top: 10px;
    left: 10px;
    width: 100px;
}
.logo-top-right {
    top: 10px;
    right: 10px;
    width: 85px;
}
.timestamp { font-size: 1.1em; }
.disclaimer {
    font-size: 0.9em;
    font-style: italic;
    margin: 15px 0;
    color: #444;
}
.disclaimer-text { color: red; font-weight: bold; }
.progress-bar-container { width: 100%; background-color: #e0e0e0; border-radius: 5px; margin: 10px 0; }
.progress-bar-inner { height: 10px; width: 0%; background-color: #007bff; border-radius: 5px; transition: width 0.5s ease-in-out; }
.progress-label { font-size: 0.8em; color: #666; }
.sponsor-logo-container { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.sponsor-text { font-size: 0.9em; color: #555; margin-bottom: 10px; }
.sponsor-logo { max-width: 200px; max-height: 80px; }
.location-retry-button { background-color: #007bff; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; margin-top: 10px; }
.location-retry-button:hover { background-color: #0056b3; }

/* ============================================= */
/* 5. Sidor: Kontakt & Integritet                */
/* ============================================= */
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.8rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.form-group textarea { min-height: 150px; resize: vertical; }
.honeypot { position: absolute; left: -5000px; visibility: hidden; }
.integrity-content { max-width: 800px; margin: 20px auto; padding: 20px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: left; line-height: 1.6; }
.integrity-content h2 { border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 30px; }
.integrity-content h3 { margin-top: 25px; color: #333; }

/* ============================================= */
/* 6. Delade Komponenter (Widgets)               */
/* ============================================= */
.contact-widget { position: fixed; bottom: 20px; right: 20px; background-color: rgba(255, 255, 255, 0.95); padding: 15px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); text-align: center; max-width: 220px; z-index: 1000; }
.contact-widget p { margin: 0 0 10px 0; font-size: 0.9em; color: #333; }
.contact-widget a { display: inline-block; transition: transform 0.2s ease; }
.contact-widget a:hover { transform: scale(1.1); }
.contact-widget img { width: 80px; height: auto; }

/* ============================================= */
/* 7. Mobilanpassning (Media Queries)            */
/* ============================================= */
@media (max-width: 768px) {
    .contact-widget { max-width: 100px; padding: 10px; bottom: 10px; right: 10px; }
    .contact-widget img { width: 40px; }
    .logo-top-left {
        width: 60px;
        top: 5px;
        left: 5px;
    }
    .logo-top-right {
        width: 50px;
        top: 5px;
        right: 5px;
    }
}
