:root {
    --primary-color: #1A5E2D;
    --primary-color-darker: #006400;
    --text-color: #212529;
    --text-color-light: #495057;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body.main-page-body {
    background-color: var(--light-gray);
    font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif) !important;
    margin: 0;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 100px;
}

.main-page-container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    padding: 30px 20px;
    flex-grow: 1;
    box-sizing: border-box;
}

.main-page-header {
    text-align: center;
    margin-bottom: 50px; 
    padding-top: 20px;
    padding-bottom: 20px;
   }

.main-page-header h1 {
    font-family: var(--font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif) !important;
    font-size: clamp(2.2rem, 5vw, 3rem);
    color: var(--primary-color, #28a745);
    margin-bottom: 15px;
    font-weight: 600;
    margin-top: 0; 
}

.main-page-header p {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: var(--dark-gray, #6c757d);
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.configurator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.configurator-box {
    background-color: #fff;
    border-radius: var(--border-radius, 8px);
    text-decoration: none;
    color: var(--text-color, #333);
    box-shadow: var(--box-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    box-sizing: border-box;
    overflow: hidden;
}

.configurator-box:hover {
    transform: translateY(-6px); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.configurator-box.image-hover-effect {
    padding: 0; 
    position: relative;
    justify-content: flex-end;
}

.configurator-box.image-hover-effect .box-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease-out;
    z-index: 1;
}

.configurator-box.image-hover-effect .box-content-wrapper {
    position: relative;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    color: white;
    z-index: 3;
    text-align: left;
    min-height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.75) 100%
    );
    transition: background-color 0.3s ease;
}

.configurator-box.image-hover-effect .box-title {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    color: white;
    margin: 0 0 5px 0;
    font-weight: 600;
    line-height: 1.3;
}

.configurator-box.image-hover-effect .box-description {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: rgba(255, 255, 255, 0.9);
    max-height: 0; 
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease-out 0.1s, opacity 0.35s ease-out 0.1s, margin-top 0.35s ease-out 0.1s;
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.5;
}

.configurator-box.image-hover-effect:hover .box-background-image {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.configurator-box.image-hover-effect:hover .box-description {
    max-height: 80px;
    opacity: 1;
    margin-top: 8px;
}

.configurator-box:not(.image-hover-effect) {
    padding: 25px;
    justify-content: space-between;
}

.configurator-box:not(.image-hover-effect) img {
    max-width: 100px;
    max-height: 100px;
    margin-bottom: 20px;
    object-fit: contain;
    align-self: center;
}

.configurator-box:not(.image-hover-effect) h2 {
    font-size: 1.3rem;
    color: var(--primary-color, #28a745);
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.configurator-box:not(.image-hover-effect) p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color-light, #495057);
    flex-grow: 1;
    margin-bottom: 0;
}

.custom-shape-promo-section {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: var(--border-radius, 8px);
    box-shadow: var(--box-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
    grid-column: 1 / -1;
    margin-top: 50px;
}

.custom-shape-content-wrapper {
    display: flex;
    align-items: center;
    gap: 50px; 
    max-width: 1200px; 
    margin: 0 auto;
    justify-content: space-between;
}

.custom-shape-text-content {
    flex: 1;
    max-width: 650px;
}

.custom-shape-text-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--primary-color, #005700);
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.35;
    font-weight: 600;
}

.custom-shape-text-content h2 .highlight {
    color: var(--primary-color);
}

.custom-shape-text-content p {
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    line-height: 1.75;
    margin-bottom: 18px;
    color: var(--text-color-light, #495057);
}

.custom-shape-contact {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color, #dee2e6);
}

.custom-shape-contact p {
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.custom-shape-contact .email-link,
.custom-shape-contact .details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    margin-right: 12px;
    color: white;
    background-color: var(--primary-color, #005700);
    font-weight: 500;
    text-decoration: none;
    padding: 12px 28px;
    border: 1px solid transparent;
    border-radius: var(--border-radius, 8px);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07);
    cursor: pointer;
}

.custom-shape-contact .email-link:hover,
.custom-shape-contact .details-link:hover {
    background-color: var(--primary-color-darker, #004400);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.custom-shape-contact .details-link {
    background-color: transparent;
    color: var(--primary-color, #005700);
    border-color: var(--primary-color, #005700);
}

.custom-shape-contact .details-link:hover {
    background-color: var(--primary-color, #005700);
    color: white;
    border-color: var(--primary-color, #005700);
}


.custom-shape-image-placeholder {
    flex: 1;
    text-align: center;
    align-self: center;
    max-width: 1000px;
}

.custom-shape-image-placeholder img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

@media (max-width: 860px) {
    .custom-shape-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .custom-shape-image-placeholder {
        order: 1;
    }
    .custom-shape-contact .email-link,
    .custom-shape-contact .details-link {
        display: block;
        width: auto;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 12px;
    }
    .custom-shape-contact .details-link:last-child { 
        margin-bottom: 0;
    }
}

.main-page-footer {
    text-align: center;
    margin-top: auto;
    padding: 25px 20px;
    border-top: 1px solid var(--border-color, #dee2e6); 
    font-size: 0.88em;
    color: var(--dark-gray, #6c757d);
    background-color: #fff;
}

body.main-page-body.dark-mode {
    --light-gray: #121212;
    --medium-gray: #1E1E1E;
    --text-color: #EAEAEA;
    --text-color-light: #A0A0A0;
    --border-color: #333333;
    --box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    --primary-color: #1A5E2D;
    --primary-color-darker: #1A5E2D;
}

body.main-page-.dark-mode header.top-navigation-bar {
    background-color: var(--medium-gray);
    border-bottom-color: var(--border-color);
}

body.main-page-.dark-mode .top-navigation-bar h1 {
    color: var(--primary-color);
}

.dark-mode .nav-contact-button {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
}

.dark-mode .nav-contact-button:hover {
    background-color: var(--primary-color);
    color: white !important;
}

body.main-page-.dark-mode .nav-contact-button:hover {
    background-color: var(--primary-color-darker);
}

.dark-mode .theme-toggle-button {
    background-color: #fff;
    border-color: transparent;
    color: var(--primary-color-darker);
}
.dark-mode .theme-toggle-button:hover {
    background-color: #f1f1f1;
}

body.main-page-.dark-mode .theme-toggle-button:hover {
    background-color: var(--primary-color-darker);
}

.dark-mode .main-page-header h1 {
    color: #EAEAEA;
}
body.main-page-.dark-mode .main-page-header p {
    color: var(--text-color-light);
}

body.main-page-.dark-mode .configurator-box {
    background-color: var(--medium-gray);
}

.dark-mode .custom-shape-promo-section {
    background-color: var(--medium-gray);
    border: 1px solid var(--border-color);
    box-shadow: none;
}
.dark-mode .custom-shape-text-content h2 {
    color: #e0e0e0;
}
.dark-mode .custom-shape-contact {
    border-top-color: var(--border-color);
}
.dark-mode .custom-shape-contact .email-link {
    background-color: var(--primary-color);
    color: white;
}
.dark-mode .custom-shape-contact .email-link:hover {
    background-color: var(--primary-color-darker);
}

.dark-mode .custom-shape-image-placeholder img {
    box-shadow: var(--box-shadow);
}

.dark-mode .main-page-footer {
    background-color: #121212;
    border-top-color: var(--border-color);
    color: var(--text-color-light);
}
body.main-page-.dark-mode .custom-shape-promo-section h2 .highlight {
    color: var(--primary-color);
}
body.main-page-.dark-mode .custom-shape-contact .email-link {
    background-color: #1A5E2D;
    border-color: #1A5E2D;
    color: white !important;
}
body.main-page-.dark-mode .custom-shape-contact .email-link:hover {
    background-color: #004b23;
    border-color: #004b23;
}

.dark-mode .custom-shape-contact .details-link {
    background-color: transparent;
    color: #e0e0e0;
    border-color: #757575;
    transition: all 0.2s ease;
}

.dark-mode .custom-shape-contact .details-link:hover {
    background-color: #004b23;
    color: #ffffff;
    border-color: #004b23;
}

body.main-page-.dark-mode .main-page-footer {
    background-color: #101010;
    border-top-color: var(--border-color);
}

.nav-logo-image {
    height: 30px;
}

header.top-navigation-bar + main {
    padding-top: 40px;
}