/* --- Global Styles --- */
:root {
    --primary: #1a3a5a;    /* Updated to a nice Dark Blue */
    --accent: #3498db;     /* Keeping your Industrial Orange for buttons */
    --topbar-bg: #f5f5f5;  /* White-Grey for the top bar */
    --dark: #1a1a1a;
    --text: #333;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: var(--text);
    background-color: #fff;
}

/* Verhindert, dass die Zeitangabe in sich zerbricht */
.contact-info span {
    display: inline-flex; /* Hält Icon und Text in einer Zeile */
    align-items: center;
    white-space: nowrap;  /* Absolutes Umbruchverbot innerhalb des Spans */
}

/* Sorgt dafür, dass bei Platzmangel die ganze Info (z.B. die E-Mail) 
   als Ganzes in die nächste Zeile rutscht */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Abstand zwischen Tel, Email und Zeit */
    text-align: center;
}

/* --- Top Contact Bar --- */
.top-bar {
    background: var(--topbar-bg); /* Now White-Grey */
    color: #555;                  /* Darker text so it's readable on light grey */
    padding: 10px 5%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid #ddd; /* Subtle line to separate from nav */
}

.contact-info span {
    margin-right: 20px;
}

/* Styling für das Firmenfoto im Kontaktbereich */
.company-photo {
    width: 100%;          /* Nutzt die Breite des Textblocks */
    max-width: 100%;     /* Begrenzt die Größe, damit es dezent bleibt */
    margin-bottom: 20px;  /* Abstand zum Namen "Maraschnow GmbH" */
    border-radius: 8px;   /* Abgerundete Ecken passend zum Design */
    overflow: hidden;
    border: 1px solid #ddd; /* Dezenter Rahmen */
}

@media (max-width: 768px) {
    .company-photo {
        max-width: 100%; /* Das Foto nutzt auf dem Handy die volle Breite der Box */
        margin-left: auto;
        margin-right: auto;
		max-height: 250px; 
        object-fit: cover;
    }
}

.company-photo img {
    width: 100%;
    height: auto;
    display: block;       /* Verhindert kleine Abstände unter dem Bild */
}

.lang-switch a {
    color: var(--primary); 
    text-decoration: none;
    font-weight: bold;
}

/* --- Navigation --- */
header {
    /* Change from var(--primary) to a light grey */
    background: #e9ecef; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #dee2e6;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    /* Ensure no background here so the header color shows through */
    background: transparent;

/* NEU: Zentrierung auf Widescreen */
    max-width: 1200px; /* Gleiche Breite wie dein Kontakt-Container */
    margin: 0 auto;    /* Zentriert die Nav im Header */
    width: 90%;        /* Sicherheitsabstand für kleinere Bildschirme */	
}

.logo {
    color: #1a3a5a; /* "PRECISION" in dark blue */
    font-weight: bold;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo span {
    color: #ffffff;      /* "MACHINING" in white */
    background: #1a3a5a; /* Dark blue background box */
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: #1a3a5a; /* Your dark blue color */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db; /* Ein frisches Blau */
}

/*Button Hover over Color*/
.btn:hover {
    background-color: #2980b9; /* Dunkleres Blau beim Drüberfahren */
    transition: background-color 0.3s ease;
}

/* --- Content Areas --- */
main {
    min-height: 70vh; /* Keeps footer down on short pages */
    padding: 40px 5%;
}

.hero {
    background: linear-gradient(rgba(26, 58, 90, 0.9), rgba(0, 100, 90, 0.9)), url('IMG/Maraschnow.gif'); /* Add your own image */
    background-size: cover;
/* This centers the image both horizontally and vertically */
    background-position: center center;
    color: white;
    text-align: center;
    padding: 100px 5%;
    display: flex;
	/* ... dein bisheriger Code ... */
    max-width: 1200px;
    margin: 20px auto; /* Zentriert die Box und gibt etwas Abstand nach oben */
    border-radius: 8px; /* Optional: abgerundete Ecken passend zum Kontakt-Container */
    flex-direction: column;
    flex-direction: column;
    align-items: center;	
}

.btn {
    background: var(--accent);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-top: 20px;
}

/* --- Tables & Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 5px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

/* --- Footer --- */
footer {
    background: var(--dark);
    color: #bbb;
    padding: 50px 5% 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box; /* Sorgt dafür, dass Padding die Breite nicht sprengt */
}

.footer-links {
    margin-top: 20px;
    display: flex;          /* Aktiviert das flexible Layout */
    justify-content: center; /* Zentriert die Links horizontal */
    flex-wrap: wrap;        /* WICHTIG: Erlaubt den Umbruch auf Mobile */
    gap: 15px 25px;         /* Abstand zwischen den Links (oben/unten & links/rechts) */
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;      /* Etwas kleiner für bessere Mobile-Ansicht */
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary); /* Oder eine Farbe deiner Wahl beim Drüberfahren */
}

/* Speziell für sehr kleine Handys */
@media (max-width: 480px) {
    .footer-links {
        flex-direction: column; /* Stapelt Links untereinander, wenn es zu eng wird */
        gap: 12px;
    }
}

/* --- Cookie Banner --- */
.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 5%;
    right: 5%;
    background: #222;
    color: white;
    padding: 20px;
    border-radius: 8px;
    display: none;
    z-index: 2000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.cookie-notice button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 15px;
}

.img-placeholder {
    width: 120px;        /* Feste Breite für das Bild, wenn Text daneben steht */
    height: 120px;       /* Feste Höhe für das Quadrat */
    flex-shrink: 0;      /* Verhindert, dass das Bild zusammengedrückt wird */
    background-color: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Verhindert, dass Fotos verzerrt werden */
}

.address-text {
    text-align: left;    /* Text linksbündig neben dem Bild */
}

.content-narrow {
    max-width: 850px;     /* Begrenzt die Breite auf ein angenehmes Maß */
    margin: 0 auto;       /* Zentriert den Block horizontal */
    padding: 20px;        /* Abstand zum Rand auf kleinen Bildschirmen */
    line-height: 1.6;     /* Etwas mehr Zeilenabstand für bessere Lesbarkeit */
}

/* Begrenzt die Breite auf der Index-Seite und zentriert den Inhalt */
.content {
    max-width: 1200px;  /* Gleiche Breite wie Header und Kontakt-Container */
    margin: 0 auto;     /* Zentriert die Sektion */
    width: 90%;         /* Puffer für kleinere Bildschirme */
}

/* Zentriert auch die Überschrift "Unsere Fähigkeiten" */
.content h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
}

.content-narrow h2 {
    margin-top: 30px;
}

/* Zentrierte Ueberschriften */

main h1 {
    text-align: center; /* Zentriert die Überschrift passend zum Container */
	color: var(--primary);
    font-size: 2rem;
    margin-bottom: 40px;
    letter-spacing: 1px;
    text-transform: uppercase; /* Wirkt technischer/industrieller */
}

/* Überschreibt die globale blaue Farbe nur innerhalb des Hero-Bereichs */
.hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Optional: macht es auf dem Bild noch lesbarer */
}

/* Falls das 'p' (Ihre Idee im Visier...) auch schwer lesbar ist: */
.hero p {
    color: #ffffff;
}

/* --- Mobile Responsive Logic --- */

/* Hamburger Icon (hidden on desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Der Haupt-Container für den Kontaktbereich */
.contact-container {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden; /* Damit das Bild an den Ecken nicht übersteht */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-top: 20px;
	
	/* NEU: Begrenzt die Breite auf Widescreens */
    max-width: 1200px;  /* Verhindert, dass er zu breit wird */
    margin-left: auto;  /* Zentriert den Container */
    margin-right: auto; /* Zentriert den Container */
	
}

/* Linke Spalte (Texte) */
.contact-info-block {
    flex: 1; /* Nimmt ca. 40-50% Platz ein */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-block h3 {
    margin-top: 0;
    color: #1a3a5a; /* Dein dunkles Blau */
}

.contact-info-block hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Rechte Spalte (Karte) */
.contact-map-block {
    flex: 1.5; /* Die Karte darf etwas breiter sein */
    position: relative;
    background: #f0f0f0;
    min-height: 400px;
}

.contact-map-block img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild füllt den Platz komplett aus */
    display: block;
}

.contact-map-block small {
    position: absolute;
    bottom: 5px;
    right: 10px;
    background: rgba(255,255,255,0.7);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.company-profile {
    margin-bottom: 50px;
    padding-top: 20px;
}

.profile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.profile-text {
    flex: 1.2;
    min-width: 300px;
    font-size: 1.1rem;
}

.profile-usps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.usp-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.usp-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.usp-item strong {
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
}

.usp-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .profile-grid {
        flex-direction: column;
    }
}

/* Mobile Optimierung: Untereinander auf dem Handy */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
    .contact-map-block {
        order: 0; /* Karte am Handy nach oben schieben */
        min-height: 300px;
    }
}

/* --- Certification Section Layout --- */
.certification-container {
    max-width: 850px; /* Gleiche Breite wie dein content-narrow */
    margin: 40px auto;
    display: flex;
    flex-wrap: wrap; /* Erlaubt das Umbrechen auf Mobile */
    gap: 30px;
    align-items: flex-start;
}

.certification-text {
    flex: 1; /* Nimmt den verfügbaren Platz links ein */
    min-width: 300px;
}

.download-box {
    flex: 0 1 350px; /* Box wird maximal 350px breit */
    display: flex;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.download-icon {
    font-size: 40px;
    margin-right: 20px;
}

.download-info h4 {
    margin: 0;
    color: var(--primary);
}

.download-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.download-info .btn {
    padding: 8px 15px;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Mobile: Wenn der Platz zu eng wird, zentriere die Box */
@media (max-width: 600px) {
    .certification-container {
        flex-direction: column;
        align-items: stretch;
    }
    .download-box {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .menu-toggle {
        display: flex; /* Show burger on mobile */
    }

    nav ul {
        display: none; /* Hide menu by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    }



nav ul.active {
        display: flex; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        
        /* MATCH THE GREY: Using the same light grey as the header */
        background: #e9ecef; 
        
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        border-bottom: 2px solid #dee2e6;
        z-index: 999;
    }

    nav ul li {
        margin: 15px 0;
    }
	
	nav ul.active li a {
        color: #1a3a5a; 
        font-size: 1.2rem; /* Slightly larger for easier tapping */
        display: block;
        padding: 10px 0;
    }
	
	/* Keep the orange hover effect for mobile users */
    nav ul.active li a:hover {
        color: #3498db; /* Blau */
        background: #f0f7ff; /* Sehr helles Blau als Hintergrund-Highlight */
    }
}