﻿:root {
	--smalldisplaywidth: 768; /* also set media query */
	--headerheight: 0;
	--footerheight: 0;
	--body-color: #555;
	--link-color :#007BFF;
}

*,
html {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}


body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100vh;
    margin: 0;
	color: var(--body-color);
	_height: 100%;
	_min-height: 100vh;
	overflow: hidden;
	padding-bottom: env(safe-area-inset-bottom);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
}

.menu-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001; 
}

.return-icon {
	position: fixed;
	top: 20px; 
	right: 20px; 
	font-size: 14px; 
	font-weight: bold; 
	cursor: pointer;
	z-index: 1002; 
	padding: 5px; 
	border: 2px solid var(--body-color); 
	border-radius: 5px; 
	background-color: white; 
}

.return-icon:hover {
	color: black; 
	border-color: black; 
}

#contentWrapper {
	display: flex;
    flex-direction: column;
	width: 100%;
	height: 100vh;
	background-image: url('/img/beratung.png');
    background-size: auto 65%;
    background-position: center;
    background-repeat: no-repeat;
}

main {
	flex-grow: 1;
	display: flex;
    flex-direction: column;
	justify-content: center;
	align-items: center;
_overflow-y: auto; 
}

.overflow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.plaintext {
    padding: 10px;
    padding-top: 25px;
    max-width: 600px;
    text-align: justify;
    height: 100vh;
    margin: 0 auto; 
}


article {
	
	h2 {
		margin-bottom: 0;
	}

	h3 {
		margin-top: 25px;
		margin-bottom: 10px;
	}
}

section p:not(:last-child) {
	margin-bottom: 5px;
}

footer {
	flex-shrink: 0;
	font-family: "Courier New", Courier, monospace; 
    font-size: small;
	text-align: center;
	padding: 10px;
	background-color: white;
}

.period {
    display: inline-block;
}

.break-before {
    display: inline-block;
    white-space: nowrap;
}

.break-before::after {
	content: ".";
}

#contentOverlay {
	position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
	background: rgba(0, 0, 0, 0.05);
}

#hoverDiv {
	width: 60%;
	height: 60%;
	justify-content: center;
	align-items: center;
	position: relative;
}

#hoverButton {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	opacity: 0;
	visibility: hidden;
	transition: opacity 3s ease, visibility 3s ease;
	border-radius: 5px; 
    cursor: pointer;
    font-size: 18px;
    font-weight: bold; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
	height: auto;
	background-color: #007BFF;
	border: none;
	color: white;
	padding: 15px 30px;
}
#hoverButton.visible {
	opacity: 1;
	visibility: visible;
}

#hoverButton:hover {
    background-color: #3399FF; 
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
	_transform: scale(1.1);
}


.content:hover .contact-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    pointer-events: auto;
    transition-delay: 0.5s; /* Add a delay to the appearance */
}
.content:not(:hover) .contact-button {
    transition-delay: 0.5s; /* Add a delay to the disappearance */
}

#content {
	color: white;
	overflow: hidden;
}

#callme {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
	margin-top: 15px;
    margin-bottom: 20px;
}

#callme h3 {
    margin-right: 10px;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 15px 0;
    margin-bottom: 25px; /* Add space after hr */
}

.hidden {
	display: none;
}

.blurred {
    filter: blur(5px);
}

#menuPopup {
	position: fixed;
    top: 60px;
    left: auto;
	right: 25px;
	padding: 25px;
	padding-bottom: 10px;
    border-radius: 8px;
    border: 1px solid gray;
	background-color: white;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
	transform: none;
    z-index: 1000;
}

.menu-links {
	text-align: center;
    display: flex;
    justify-content: space-between;
    margin: 20px 0 0 0;
}

#menuPopup span {
    text-decoration: none;
	font-weight: bold;
    color: var(--link-color);
    cursor: pointer;
	font-size: large;
}


.contact-form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
	width: 700px;
    max-width: 800px;
    background-color: white;
    padding: 20px;
	border-radius: 6px;
    box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.banner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    color: white;
    z-index: 1001;
}
.banner.success {
    background-color: green;
}
.banner.failure {
    background-color: red;
}
.disabled {
    background-color: grey;
    cursor: not-allowed;
}








.container-mailForm {
	margin-top: 20px;
border: 1px solid lightgray;
}



.inputWrapper.last {
	top: 0;
	align-items: flex-start;
}
	
#contactForm {
    width: 650px;
    max-width: 800px;
	display: block;
}

#message {
	height: 120px;
}






/* Media query for mobile devices */
@media (max-width: 768px) {
	
	body {
		height: -webkit-fill-available;
		min-height: 100%;
	}

	#contentWrapper {
		background-size: calc(max(100%, 500px)); /* Ensures the background is at least 500px wide */
		background-size: 90% 50%;
	}
	
	#menuPopup {
		left: 5px;
		right: 5px;
	}
	
	#hoverDiv {
		width: 90%;
	}
	
	#hoverButton {
		width: 96%;
	}
	
	.plaintext {
		margin: 0;
        padding: 20px;
	}
	
    .content {
        width: 100%;
        background-size: 90% auto;
    }
	
	.menu-icon {
		top: 0;
		right: 0;
		font-size: 32px;
		padding: 20px;
		padding-top: 15px;
	}
	
	/* footer formatting */
	.period {
        display: none; 
    }
	
    .break-before {
        display: block;
    }
	
	.break-before::after {
        content: ""; 
    }
	
	.popup {
        _position: relative;
        _top: 0;
        _left: 0;
        _transform: none;
        padding: 10px;
        border: none;
        box-shadow: none;
		width: 100%;
    }
	
	#contactForm {
		width: 100%;
	}
	
	.inputWrapper {
        _width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
	
	.large {
        height: 140px;
    }
}

/* Media query for iPads and Surface Pro devices */
@media (min-width: 768px) and (max-width: 1024px) {
	
    .content {
        width: 100%;
        background-size: 80% auto;
    }
}

/* Media query for iOS devices */
@media screen and (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    
	.return-icon {
		border-radius: 50%;
		border: none; 
		background-color: rgba(255, 255, 255, 0.3); 
		font-size: 24px;
    }
    }


@supports (-webkit-touch-callout: none) {
	body {
		_border: 1px solid red;
		height: 100vh;
		_height: 100dvh;
	}
}


form input, form textarea {
    width: calc(100% - 10px);
    margin: 0;
}

.contact-form-popup h3 {
    margin-bottom: 25px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sr-only.focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1em;
  padding: 0.5em 1em;
  background: #000;
  color: #fff;
  z-index: 1000;
}




.menu-icon {
  /* default: burger 
  font-size: 1.5em;
  /* if you were doing it with `content`, for example: */
}
.menu-icon::before {
  content: '\2630'; /* ☰ */
}

/* when we’re in “return” mode… */
.menu-icon.return-icon::before {
  content: '\21A9'; /* ↩ */
}
