/* styles.css */
* {
    box-sizing: border-box;
}

@font-face {
    font-family: "Open Sans";
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    src: 
    url(/fonts/OpenSans-Light.ttf) format("truetype"),
    url(/fonts/OpenSans-Light.woff2) format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-weight: 350;
    font-style: normal;
    font-display: swap;
    src: 
    url(/fonts/OpenSans-Medium.ttf) format("truetype"),
    url(/fonts/OpenSans-Regular.woff2) format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    src: 
    url(/fonts/OpenSans-SemiBold.ttf) format("truetype"),
    url(/fonts/OpenSans-Semibold.woff2) format("woff2");
}

body {
    font-family: 'Open Sans', Tahoma, sans-serif;
    font-weight: 300;
    line-height: 1.4; /* Ensures consistent spacing */
    letter-spacing: 0.7px; /* Adjust based on Open Sans metrics */
    height: 100%;
    margin-top: 0;
    padding: 0;
    min-width: 100vw;
    overflow-x: hidden;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9f6f1;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

header {
    min-height: 177px; /* Match the image height */
    display: flex;
    justify-content: center;
    align-items: center;
}

header, footer {
    background-color: #5d4037;
    color: white;
    padding: 1rem;
    text-align: center;
}

.image_r {
    margin-left: 20px;
    float: right;
    clip-path: circle(50%);
    shape-outside: circle(50%);
}

.image_l {
    margin-right: 20px;
    float: left;
    clip-path: circle(50%);
    shape-outside: circle(50%);
}

p {
    font-size: 18px;
}

.center {
    text-align: center;
}

.center strong {
    font-size: 22px;
}

strong {
    font-weight: 400;
}

h1 {
    line-height: 1.4; /* Ensures consistent spacing */
    letter-spacing: 0.7px; /* Adjust based on Open Sans metrics */
    font-size: 32px;
    font-weight: 300;
}

h2 {
    line-height: 1.4; /* Ensures consistent spacing */
    letter-spacing: 0.7px; /* Adjust based on Open Sans metrics */
    font-size: 28px;
    font-weight: 300;
}

a:link {
  text-decoration: underline;
}

/* mouse over link */
a:hover {
  color: darkgrey;
  text-decoration: none;
}

a:visited {
    color: darkgray;
}

/* selected link */
a:active {
  color: darkgrey;
}

nav {
    background-color: #6E4C3F;
    text-decoration: none;
    padding: 0.5rem;
    text-align: center;
    font-size: 18px;
    min-height: 30px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 350;
    padding: 0.5rem 1rem;
    transition: border-bottom 0.3s, color 0.3s;
    border-bottom: 2px solid transparent;
}

nav a:link {
    color: #fff;
    text-decoration: none;
}

nav a:hover {
    border-bottom: 6px solid #ffcc80;
    color: #ffcc80;
    text-decoration: none;
}

nav a:visited {
    color: white;
}

.content {
    width: 100%;
    max-width: 900px;
    content-visibility: auto;
    contain-intrinsic-size: 1000px; /* Approximate value based on content */
    padding: 1rem;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: justify;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 gleich breite Spalten */
    min-height: 200px;
    gap: 15px; /* Abstand zwischen den Grid-Elementen */
    padding: 20px; /* Außenabstand des gesamten Grids */
}

.grid-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.keyword {
    gap: 16px;
    font-weight: 400;
    font-size: 1.1em;
    margin-bottom: 12px;
}

.description {
    color: #666;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.service-card {
    position: relative;
    height: 200px;
    border-radius: 12px;
    border: 1px solid #ddd;
    cursor: pointer;
    background: white;
    overflow: hidden;
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: opacity 0.2s ease;
}

.card-front {
    background: white;
    opacity: 1;
}

.card-back {
    background: rgba(0, 0, 0, 0.03);
    opacity: 0;
}

.service-card:hover .card-front {
    opacity: 0;
}

.service-card:hover .card-back {
    opacity: 1;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 400;
    text-align: center;
}

.service-description {
    font-size: 1rem;
    line-height: 1.4;
    text-align: center;
}



.contact-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 300;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Bessere Lesbarkeit auf Mobile */
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.required::after {
    content: "*";
    color: red;
    margin-left: 4px;
}

.error {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 5px;
    display: none;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 20px auto;
    padding: 0 20px;
}

.contact-option {
    background-color: white;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 1 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.contact-option:hover {
    transform: translateY(-2px);
}

.option-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #795548;
    border-radius: 50%;
    color: white;
}

.option-icon svg {
    width: 24px;
    height: 24px;
}

.contact-option h3 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 20px;
}

.contact-option p {
    color: #666;
    margin: 5px 0;
    font-size: 14px;
}

.time-info {
    color: #888;
    font-size: 12px;
    margin-top: 10px;
}

.centrdiv {
    align-items: center;
    text-align: center;
}

.contact-button {
    display: inline-block;
    background-color: #795548;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 4px;
    margin: 10px 0;
    transition: background-color 0.2s ease;
}

.contact-button:link {
    text-decoration: none;
    color: white;
}

.contact-button:hover {
    background-color: #5d4037;
    color: white;
}

.contact-button:visited {
    text-decoration: none;
    color: white;
}

button {
    background-color: #795548;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
/*    max-width: 200px;*/
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #5d4037;
}

button:active {
    transform: translateY(1px);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Viewport height statt prozentual */
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    position: fixed;
    top: 50vh; /* Viewport height für vertikale Zentrierung */
    left: 50%;
    width: 90%;
    max-width: 500px;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    z-index: 1001; /* Höher als das Modal selbst */
}

.modal.show .modal-content {
    transform: translate(-50%, -50%);
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    color: #666;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    padding: 5px;
    width: auto;
    max-width: none;
}

.close-modal:hover {
    color: #333;
    background: none;
}

footer {
    font-size: 0.8rem;
}

#preise {
    padding: 2rem 0;
}

.price-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.price-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
}

.price-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.price-header h3 {
    color: #5d4037;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 400;
}

.size-info {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.price-amount {
    font-size: 2rem;
    color: #795548;
    margin: 1rem 0;
    font-weight: 400;
}

.price-details {
    margin-top: auto;
    color: #666;
}

.travel-info {
    background-color: #f9f6f1;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
}

.travel-icon {
/*    background-color: #795548;*/
/*    border-radius: 50%;*/
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.travel-text h3 {
    color: #5d4037;
    margin: 0 0 0.5rem 0;
    font-weight: 400;
}

.travel-text p {
    margin: 0;
    font-size: 1.1rem;
}

.travel-note {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.price-notes {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #795548;
}

.price-notes p {
    margin: 0.5rem 0;
    color: #333;
}


/* Media Queries für mobile Geräte */

/*Tablet*/
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/*Smartphone*/
@media (max-width: 768px) {
    nav a {
        display: block;
        padding: 0.5rem;
    }
    .image_r {
        margin: 10px;
        float: none;
        border-radius: 50%;
    }

    .image_l {
        margin: 10px;
        float: none;
        border-radius: 50%;
    }

    .content {
        padding: 0.5rem;
    }

    .modal-content {
        width: 95%;
        bottom: 10px; /* Kleinerer Abstand auf mobilen Geräten */
    }
    
    .price-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .price-card {
        margin: 0 1rem;
    }

    .travel-info {
        margin: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .price-notes {
        margin: 1rem;
    }
    
    /* Grid auf eine Spalte umstellen */
    .grid-container {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
        max-width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-options {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }
    
    .contact-option {
        padding: 15px;
    }

    /* Speziell für grid-container2 parent/child Layout */
    .parent-tile {
        grid-column: 1;
        grid-row: auto;
    }

    /* Formular-Anpassungen */
    .contact-form {
        margin: 10px;
        padding: 10px;
        width: calc(100% - 20px);
    }

    .form-group {
        padding: 0;
    }

    /* Verbesserte Touch-Targets */
    .form-group input,
    .form-group textarea,
    button {
        padding: 12px;
        margin-bottom: 10px;
    }

    /* Container-Anpassungen */
    .content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    button {
        max-width: 100%;
    }
}

/* Zusätzliche Anpassungen für sehr kleine Bildschirme */
@media (max-width: 480px) {
    .grid-container,
    .grid-container2 {
        gap: 8px;
        padding: 8px;
    }

    .tile {
        padding: 20px;
    }
}