*, *::before, *::after {
    box-sizing: border-box;
}

html, body{
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-image: linear-gradient(rgba(85, 85, 85, 0.3), rgba(51, 51, 51, 0.5)), url("brick_wall.png"); 
    background-repeat: repeat;
    background-size: 150px;
    background-attachment: fixed;
    color: #f4f4f4; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}

main {
    flex-grow: 1;
    padding: 40px;
    margin: 40px auto;
    margin-top: 150px;
    max-width: 75%;
    min-width: auto;
    background-color: rgba(51, 51, 51, 0.7); 
    border-radius: 8px;
    box-shadow: 0 0 25px rgb(34, 34, 34);

}

a {
    color: #5a8325; 
    text-decoration: none; 
    transition: color 0.3s ease; 
}

a:hover {
    color: #5a8325; 
}

.info-block, .lang-info-block {
    background-color: #3f3f3f; 
    padding: 25px; 
    margin-bottom: 20px;
    border-radius: 6px; 
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.05); 
    border-left: 5px solid #5a8325; 
    transition: box-shadow 0.25s ease-in-out;
    opacity: 0.9;
}

.info-block:hover, .lang-info-block:hover{
    box-shadow: 0 0px 6px #5a8325; 

}

.info-block-name, .lang-info-block-name {
    color: #7da71b; 
    font-size: 1.2em; 
    margin-bottom: 10px;
    font-weight: bold; 
}

.info-block-inhalt, .lang-info-block-inhalt {
    display: block;
    list-style: none;
    padding-left: 20px;
}

.info-block-inhalt li::before, .lang-info-block li::before {
    content: "\2022"; 
    color: #5a8325; 
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}


/* Style für Tabellen mit 3 Spalten */
.price-table:not(.two-columns) th:nth-child(1),
.price-table:not(.two-columns) td:nth-child(1) {
    width: 50%;
}

.price-table:not(.two-columns) th:nth-child(2),
.price-table:not(.two-columns) td:nth-child(2),
.price-table:not(.two-columns) th:nth-child(3),
.price-table:not(.two-columns) td:nth-child(3) {
    width: 25%;
}

/* Style für Tabellen mit 2 Spalten */
.price-table.two-columns th:nth-child(1),
.price-table.two-columns td:nth-child(1) {
    width: 75%;
}

.price-table.two-columns th:nth-child(2),
.price-table.two-columns td:nth-child(2) {
    width: 25%;
}

.table-container , .table-container-2{
    overflow-x: auto; 
    margin-bottom: 20px;
}

.price-table {
    width: 100%;
    border-collapse: collapse; 
    margin-top: 15px;
    background-color: #444; 
    color: #f4f4f4; 
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
}

.price-table th, .price-table td {
    padding: 12px 15px;
    text-align: left;
    z-index: 1;
}

.price-table th {
    background-color: #333;
    font-weight: bold;
}

.price-table tbody tr:nth-child(even) {
    background-color: #4a4a4a;
}

.price-table tbody tr:hover {
    background-color: #555; 
}

#wandanstrich, #laminat-verlegen, #spachtelarbeiten, #tapezieren, #vinyl-verlegen, #trockenbau-wande, #trockenbau-decken {
    scroll-margin-top: 50vh;
}

.secundary-text {
    display: flex;
    color: #5a8325; 
    justify-content: center;
    font-weight: bold; 
}

.photo-block{
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    background-color: #3f3f3f; 
    padding: 40px; 
    margin-bottom: 20px;
    border-radius: 6px; 
    box-shadow: 0 0px 6px rgba(0, 0, 0, 0.05); 
    border-left: 5px solid #5a8325; 
    transition: box-shadow 0.25s ease-in-out;
    opacity: 0.9;
}

.photo-block:hover{
    box-shadow: 0 0px 6px #5a8325; 

}

.photoImg{
    width: 240px;
    height: 240px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    object-fit: cover; 
}

.photoImg:hover {
    transform: scale(1.03); 
}

.photoImg.zoomed {
    position: fixed;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%) scale(3.5);
    max-width: 95%; 
    max-height: 90%; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background-color: white;
    padding: 10px;
    object-fit: contain; 
    image-rendering: optimizeQuality;
    z-index: 1001;
}

/* Spinner and image load transitions */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.photo-loading .spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255,255,255,0.35);
    border-top-color: #7da71b; /* matching theme green */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

.photoImg {
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.3s ease-in-out;
}

.photoImg.loaded {
    opacity: 1;
}

.zoom-navigation {
    position: fixed;
    display: flex;
    justify-content: space-between;
    top: 50%;
    left: 0;
    right: 0;
    min-width: auto;
    transform: translateY(-50%);
    padding: 0 10px;
    z-index: 1000;
}

.zoom-navigation button {
    font-size: 1.5em;
    padding: 60px 30px;
    margin: 0 10px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 5px;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease-in-out;
}

.zoom-navigation button.disabled-button {
    color: #4a4a4a;
}

.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0s 0.3s; /* Fade in, and delay visibility to hide quickly */
}

.lang-info-block{
    display: none;
}

.lang-info-block.active {
    display: block;
}
.langButtonBlock{
    display: flex;
}

.lang-button-block{
    display: flex;
    gap: 20px;
    align-items:end;
    padding: 20px 50px;
    margin-bottom: 20px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.lang-button.active {
    transform: scale(1.3); 
    box-shadow: 0 0 15px rgb(76, 175, 79);
    border: 2px;
}    

.lang-button{
    width: 30px;
    height: 15px;
    padding: 0px 0px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0 10px rgb(0, 0, 0);
    opacity: 0.7;
}

.lang-img{
    position: relative;
    width: inherit;
    margin: -1px;
}

.lang-button:hover{
    transform: scale(1.1);
    box-shadow: 0 0 10px  #4caf4fea;
}

@media (max-width: 600px) {
    .zoom-navigation button {
        display: none;
    }

    .photoImg.zoomed {
        padding: 2px;
        transform: translate(-50%, -50%) scale(3.5);
    }

    .photo-block{
        gap: 7px;
        padding: 20px;
    }

    .photoImg{
        width: 120px;
        height: 120px;
    }

    main{
        max-width: 100%;
    }
    .info-block-name, .lang-info-block-name{
        font-size: 1em;
    }

    .info-block-inhalt, .lang-info-block-inhalt{
        font-size: 0.8;
    }

     .price-table, .price-table tbody, .price-table tr, .price-table td {
        display: block; 
        width: 100%;
    }

    
    .price-table thead {
        display: none;
    }

    
    .price-table:first-of-type thead {
        display: block;
        background-color: #333;
        font-weight: bold;
        padding: 12px 15px;
        text-align: center;
    }

    
    .price-table:first-of-type thead th {
        display: none;
    }

    /* 4. Show ONLY the first th element within the first thead */
    .price-table:first-of-type thead th:first-of-type {
        display: block;
        text-align: center;
        font-size: 1em;
        padding: 0;
        border-bottom: none;
    }

    

    .price-table tr {
        margin-bottom: 15px; 
        border: 0px solid #555;
        border-radius: 4px;
        padding: 0;
    }

    .price-table td {
        text-align: center; 
        padding: 12px 15px;
        position: relative;
        border: none; 
        border-bottom: 1px solid #555; 
        padding: 0;
    }

    .price-table td:last-child {
        border-bottom: none; 
    }

    .price-table td::before {
        content: attr(data-label); 
        position: absolute;
        left: 15px; 
        width: calc(50% - 30px); 
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; 
        font-weight: bold;
        color: #4CAF50; 
        text-align: left;
    }

    /* Style für Tabellen mit 3 Spalten */
    .price-table:not(.two-columns) th:nth-child(1),
    .price-table:not(.two-columns) td:nth-child(1) {
        width: 100%;
    }

    .price-table:not(.two-columns) th:nth-child(2),
    .price-table:not(.two-columns) td:nth-child(2),
    .price-table:not(.two-columns) th:nth-child(3),
    .price-table:not(.two-columns) td:nth-child(3) {
        width: 100%;
    }

    /* Style für Tabellen mit 2 Spalten */
    .price-table.two-columns th:nth-child(1),
    .price-table.two-columns td:nth-child(1) {
        width: 100%;
    }

    .price-table.two-columns th:nth-child(2),
    .price-table.two-columns td:nth-child(2) {
        width: 100%;
    }
}
