.header-image-container {
    text-align: center;
    width: 100%;
}

.header-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 200px;
    display: block;
    margin: 0 auto;
}

/* Responsive header image */
@media (max-width: 768px) {
    .header-image {
        max-height: 150px;
    }

    .homepage-header {
        padding: 5px 0 8px;
    }
}

@media (max-width: 480px) {
    .header-image {
        max-height: 120px;
    }

    .homepage-header {
        padding: 5px 0 5px;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    background-color: #fff;
}

/* Dark theme for felanmälan page */
body.dark-theme {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Homepage specific styling */
body.homepage {
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

/* Homepage header styling */
.homepage-header {
    background-color: #000000;
    padding: 0 0 10px;
    text-align: center;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.qr-bubble {
    background-color: #ffffff;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.qr-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #ffffff;
}

.qr-code {
    text-align: center;
    font-size: 10px;
    color: #333;
}

.qr-placeholder span {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.qr-squares {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    width: 40px;
    height: 40px;
    margin: 0 auto;
}

.qr-square {
    background-color: #333;
    border-radius: 2px;
}

.logo-container {
    text-align: center;
}

.main-logo {
    height: 80px;
    margin-bottom: 10px;
}

.tagline {
    background-color: #D2232A;
    color: white;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.powered-by {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
}

.homepage-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 20px 40px;
}

.landing-info {
    margin-bottom: 10px;
    width: 100%;
}

.takecare-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    color: #ffffff;
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: normal;
}

.welcome-section h3 {
    color: #ffffff;
    font-size: 32px;
    margin: 0;
    font-weight: bold;
}

.welcome-section .object-info {
    color: #ffffff;
    font-size: 16px;
    margin: 5px 0;
    opacity: 0.9;
}

.welcome-section .location-info {
    color: #ffffff;
    font-size: 14px;
    margin: 5px 0;
    opacity: 0.8;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    margin-bottom: 15px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.3s, transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Disabled menu items */
.menu-link.disabled {
    opacity: 0.6;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-link.disabled:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Object prompt styling */
.object-prompt {
    margin-top: 15px;
    text-align: center;
}

.object-prompt p {
    color: #ffffff;
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
    font-style: italic;
}

/* No support section styling */
.no-support-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
}

.no-support-section h3 {
    color: #ffffff;
    font-size: 28px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.no-support-section p {
    color: #ffffff;
    font-size: 16px;
    margin: 0 0 25px 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Button to enter object number */
.btn-enter-object {
    background-color: #D2232A;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(210, 35, 42, 0.3);
}

.btn-enter-object:hover {
    background-color: #B01E24;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(210, 35, 42, 0.4);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
    flex-shrink: 0;
}

.menu-link span {
    font-size: 18px;
    font-weight: 500;
}

/* Add title icon styling */
.title-icon {
    font-size: 2em;
    margin-right: 0.5em;
}

/* Container to center content */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Header with Perfect Print red */
.site-header {
    background-color: #1c2529;
    padding: 10px 0;
}

.site-header .logo {
    height: 40px;
    vertical-align: middle;
}

/* Headings */
h1,
h2 {
    color: #D2232A;
    margin-bottom: 0.5em;
}

h3 {
    color: #333;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Separator */
hr {
    border: none;
    border-top: 2px solid #EEE;
    margin: 20px 0;
}

/* Content sections */
.content-section {
    margin-bottom: 2em;
}

.form-group {
    margin-bottom: 1em;
}

.btn-submit {
    background-color: #D2232A;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #B01E24;
}

/* Back link */
.back-link {
    margin-top: 2em;
    padding-top: 1em;
    border-top: 1px solid #EEE;
}

.back-link a {
    color: #D2232A;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Links */
a {
    color: #D2232A;
}

a:hover {
    color: #B01E24;
}

/* Page header with icon */
.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 1em;
}

/* Page icon styling for PNG images */
.page-icon {
    width: 2em;
    height: 2em;
    margin-right: 0.5em;
    object-fit: contain;
}


/* Contact form styling */
.contact-form {
    max-width: 800px;
    margin: 2em 0;
}

.contact-form .form-group {
    margin-bottom: 1em;
}

.contact-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333;
    box-sizing: border-box;
}

.contact-form input::placeholder {
    color: #999;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 14px;
    line-height: 1.4;
}

.policy-link {
    color: #3498db;
    text-decoration: none;
}

.policy-link:hover {
    text-decoration: underline;
}

/* Submit button */
.contact-form .btn-submit {
    background-color: #D2232A;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 1em;
}

.contact-form .btn-submit:hover {
    background-color: #B01E24;
}

/* File upload styling */
.file-upload-label {
    display: block;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 14px;
}

.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    z-index: 1;
}

.file-upload-button:hover {
    background-color: #f8f9fa;
}

.file-upload-text {
    color: #999;
    font-size: 16px;
    display: block;
    width: 100%;
}

/* Select styling for contact form */
.contact-form select {
    width: 100%;
    padding: 15px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 16px;
    background-color: #ffffff;
    color: #333;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.contact-form select option:first-child {
    color: #999;
}

/* Form labels */
.contact-form label {
    display: block;
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Dark theme select styling */
body.dark-theme .contact-form select {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #555;
}

body.dark-theme .contact-form label {
    color: #ffffff;
}

/* Dark theme overrides */
body.dark-theme h1,
body.dark-theme h2 {
    color: #ffffff !important;
}

body.dark-theme .site-header {
    background-color: #1a252f !important;
}

body.dark-theme .back-link {
    border-top: 1px solid #555;
}

body.dark-theme .back-link a {
    color: #3498db !important;
}

body.dark-theme .content-section {
    color: #ffffff;
}

/* Ensure form elements show properly on dark background */
body.dark-theme .contact-form input {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #555;
}

body.dark-theme .checkbox-group label {
    color: #ffffff;
}

body.dark-theme .policy-link {
    color: #3498db;
}

/* Dark theme file upload */
body.dark-theme .file-upload-label {
    color: #ffffff;
}

body.dark-theme .file-upload-button {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #555;
    width: 100%;
    box-sizing: border-box;
}

/* Message alerts */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Dark theme message styling */
body.dark-theme .alert-success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border-color: #28a745;
}

body.dark-theme .alert-error {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-color: #dc3545;
}

/* Popup overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.popup-content {
    background-color: #000000;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-content h3 {
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
    font-size: 20px;
}

.popup-content p {
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
    opacity: 0.9;
    line-height: 1.4;
}

.popup-form-group {
    margin-bottom: 20px;
}

.popup-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-sizing: border-box;
}

.popup-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.popup-input:focus {
    outline: none;
    border-color: #D2232A;
    background-color: rgba(255, 255, 255, 0.15);
}

.popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-popup-submit {
    background-color: #D2232A;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 80px;
}

.btn-popup-submit:hover {
    background-color: #B01E24;
}

.btn-popup-cancel {
    background-color: transparent;
    color: #ffffff;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
}

.btn-popup-cancel:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive popup */
@media (max-width: 480px) {
    .popup-content {
        padding: 20px;
        margin: 20px;
    }

    .popup-buttons {
        flex-direction: column;
    }

    .btn-popup-submit,
    .btn-popup-cancel {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Animation for popup */
.popup-overlay {
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-section {
        flex-direction: column;
        gap: 15px;
    }

    .qr-bubble {
        width: 100px;
        height: 100px;
    }

    .main-logo {
        height: 60px;
    }

    .welcome-section h2 {
        font-size: 18px;
    }

    .welcome-section h3 {
        font-size: 24px;
    }

    .menu-link span {
        font-size: 16px;
    }
}

/* Prevent iOS zoom on inputs */
input,
select,
textarea,
button {
    font-size: 16px;
}

/* Images scale on small screens */
img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* Wrap long content */
.content-section {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Truncate long filenames in file upload */
.file-upload-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile refinements */
@media (max-width: 600px) {
    .container {
        padding: 16px;
    }

    .homepage .container {
        padding: 16px;
    }

    .main-logo {
        height: 60px;
    }

    .landing-info h1 {
        font-size: 20px;
    }

    .welcome-section h2 {
        font-size: 18px;
    }

    .welcome-section h3 {
        font-size: 24px;
    }

    .menu-link {
        padding: 12px;
        gap: 10px;
    }

    .menu-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .contact-form {
        margin: 1em 0;
    }

    .contact-form input,
    .contact-form select {
        padding: 12px;
        font-size: 16px;
    }

    .contact-form .btn-submit,
    .btn-submit {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }

    .page-header .error-icon,
    .page-header .return-icon,
    .page-header .info-icon {
        font-size: 1.6em;
        margin-right: 0.4em;
    }

    /* Mobile styling for no-support section */
    .no-support-section {
        padding: 20px 16px;
        margin-bottom: 30px;
    }

    .no-support-section h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .no-support-section p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn-enter-object {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .homepage-content {
        padding: 15px 16px 24px;
    }

    .contact-form input,
    .contact-form select {
        padding: 10px;
    }
}

/* Override dark theme defaults for homepage */
body.homepage.dark-theme .site-header {
    display: none;
}

body.homepage h1,
body.homepage h2,
body.homepage h3 {
    color: #ffffff;
}