body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 17px;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f4f4f4;
}

/* CSS Variables for theming */
:root {
    --bg-color: #f4f4f4;
    --text-color: #333;
    --header-bg-start: #2c3e50;
    --header-bg-end: #34495e;
    --header-text: #fff;
    --nav-bg: #34495e;
    --nav-text: #fff;
    --section-bg: #fff;
    --section-text: #000;
    --section-heading-color: #2c3e50;
    --accent-color: #e74c3c;
    --border-color: #ddd;
    --specs-bg: #f9f9f9;
    --specs-border: #2c3e50;
    --footer-bg: #2c3e50;
    --footer-text: #fff;
    --modal-bg: rgba(0,0,0,0.9);
    --modal-close: #f1f1f1;
    --modal-close-hover: #bbb;
    --shadow-color: rgba(0,0,0,0.2);
    --button-bg: #fff;
    --button-text: #000;
    --button-hover-bg: #e74c3c;
    --button-hover-text: #fff;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --header-bg-start: #0f1419;
    --header-bg-end: #1a252f;
    --header-text: #fff;
    --nav-bg: #1a252f;
    --nav-text: #fff;
    --section-bg: #2a2a2a;
    --section-text: #e0e0e0;
    --section-heading-color: #fff;
    --accent-color: #ff6b6b;
    --border-color: #444;
    --specs-bg: #333;
    --specs-border: #555;
    --footer-bg: #0f1419;
    --footer-text: #e0e0e0;
    --modal-bg: rgba(0,0,0,0.95);
    --modal-close: #e0e0e0;
    --modal-close-hover: #ccc;
    --shadow-color: rgba(255,255,255,0.1);
    --button-bg: #333;
    --button-text: #e0e0e0;
    --button-hover-bg: #ff6b6b;
    --button-hover-text: #fff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 17px;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Remove default borders and outlines from images */
img {
    border: none;
    outline: none;
    background: transparent;
}

/* Remove focus outlines from images */
img:focus {
    outline: none;
    box-shadow: none;
}

header {
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
    color: var(--header-text);
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 2px 10px var(--shadow-color);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

#language-selector {
    margin-top: 1rem;
}

#language-selector button {
    background-color: rgba(255,255,255,0.2);
    color: var(--header-text);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#language-selector button:hover {
    background-color: rgba(255,255,255,0.4);
}

#language-selector button.active {
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
}

nav ul {
    list-style: none;
    padding: 0;
    background-color: var(--nav-bg);
    text-align: center;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0;
}

nav ul li a {
    color: var(--nav-text);
    text-decoration: none;
    padding: 1rem 2rem;
    display: block;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--header-bg-start);
}

section {
    padding: 3rem 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    background-color: var(--section-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background-color 0.3s ease;
}

section h2 {
    color: var(--section-heading-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    border-top: 3px solid var(--accent-color);
    padding-top: 1.5rem;
}

.images img {
    width: 80%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease;
}

.images img:focus {
    outline: none;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.images img:hover {
    transform: scale(1.05);
}

.contact-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.buttons {
    flex: 1;
    text-align: left;
}

.buttons button {
    display: block;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 2px solid var(--accent-color);
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.buttons button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
}

.info {
    flex: 1;
    text-align: right;
    padding-left: 2rem;
}

.info p {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .contact-details {
        flex-direction: column;
        text-align: center;
    }
    .buttons {
        text-align: center;
        margin-bottom: 1rem;
    }
    .info {
        text-align: center;
        padding-left: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .info p {
        text-align: center;
    }
}

#map {
    text-align: center;
    margin-top: 1rem;
}

#map iframe {
    width: 100%;
    max-width: 600px;
    height: 450px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
}

ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    nav ul li a {
        padding: 1rem;
    }
    section {
        padding: 2rem 1rem;
    }
    #language-selector button {
        display: block;
        margin: 0.5rem auto;
        width: 100%;
        max-width: 200px;
    }
    
    /* Mobile layout for machine park - image on top, text below */
    .machine {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .machine img {
        width: 80%;
        max-width: 300px;
    }
    
    /* Ensure consistent spacing for specs on mobile */
    .specs {
        width: 100%;
    }
    .specs li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        text-align: left;
        min-height: auto;
        padding: 0.75rem;
    }
}

.machine {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
    border-top: 3px solid var(--accent-color);
    padding-top: 1.5rem;
}

.machine img {
    width: 300px;
    height: auto;
    border-radius: 8px;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease;
}

.machine img:focus {
    outline: none;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.machine img:hover {
    transform: scale(1.05);
}

.specs {
    flex: 1;
}

.specs h3 {
    margin-top: 0;
}

.specs ul {
    list-style: none;
    padding: 0;
}

.specs li {
    background-color: var(--specs-bg);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--specs-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px var(--shadow-color);
}

/* Measurement / quality control images */
.measurement {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    align-items: center;
    justify-content: center;
    border-top: 3px solid var(--accent-color);
    padding-top: 1.5rem;
}
.measurement img {
    width: 40%;
    height: auto;
    border-radius: 6px;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease;
}

.measurement img:focus {
    outline: none;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.measurement img:hover {
    transform: scale(1.05);
}

/* Image Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    cursor: pointer;
}

.modal img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none;
    outline: none;
    background: transparent;
}

.modal img:focus {
    outline: none;
    box-shadow: none;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--modal-close);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--modal-close-hover);
    text-decoration: none;
}

/* Theme Toggle Button */
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1001;
}

#theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

[data-theme="dark"] #theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] #theme-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* Image Protection */
.image-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
    background-size: 20px 20px;
    z-index: 5;
    pointer-events: none;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.image-protection-overlay:hover {
    opacity: 0.4;
}

/* Watermark styling */
.image-watermark {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: rgba(0, 0, 0, 0.8);
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 15;
}

[data-theme="dark"] .image-watermark {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.image-watermark-diagonal {
    position: absolute;
    top: 20px;
    left: 20px;
    color: rgba(255, 0, 0, 0.5);
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    transform: rotate(-15deg);
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.95);
    pointer-events: none;
    z-index: 15;
    letter-spacing: 2px;
}

[data-theme="dark"] .image-watermark-diagonal {
    color: rgba(255, 100, 100, 0.6);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.95);
}

/* Additional protection styles */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Prevent text selection around images */
.images, .machine, .measurement {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}