* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

nav {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1005;
}

nav .container {
    margin: 0 5%;
    padding: 0 5%;
    padding-left: 2%;
    margin-left: 1%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 70%;
    gap: 46%;
}

.logo {
    align-items: left;
}

.logo img {
    height: 10vh;
    padding: 3%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    transition: transform 0.3s ease-in-out;
}

.mobile-nav {
    display: none;
}

.nav-links li {
    padding-left: 10%;
    padding-right: 5%;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    font-size: larger;
    font-weight: bold;
}

.nav-links a:hover {
    color: #007bff;
}

.post__content1{
    /* padding-left: 1%; */ /* Consider removing if parent padding is enough */
    flex: 1; /* Takes available space on the left */
    max-width: 50%;
    padding-left: 5%;
}
.post__image_nalepnice { /* Selector changed from #Nalepnice .post__image_nalepnice */
    flex: 0 0 40%; /* Do not grow, do not shrink, basis is 40%. */
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative; /* Added for positioning children */
    overflow: hidden;   /* Added to contain scaled image */
    transition: transform 0.3s ease; /* Added for hover effect */
    transform: scale(1); /* Base state for hover effect */
    /* flex-shrink: 0; is covered by flex shorthand */
}
.post__image_nalepnice:hover {
        transform: scale(1.05);
    }
.post__image_nalepnice .link{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.wrap {
    max-width: 100%;
    padding: 10px 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px));
    gap: 20px;
}

.post__content {
    padding-top: 15vh;
    flex-direction: column;
    margin-bottom: 0;
}

.post__image-wrap {
    flex: 0 0 100%;
    padding-right: 0;
    margin-bottom: 20px;
    padding-top: 2%
}

.post__image {
    width: 100%;
    padding-bottom: 66%;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    transform: scale(1); 
}
.post__image-wrap:hover .post__image {
    transform: scale(1.05);
}
.image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.post__image .link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.post__content-wrap {
    flex: 0 0 100%;
}
.post__content-wrap1 {
    flex: 0 5% 100%;
    padding-top: 13vh;
    padding-right: 5%; /* Added for symmetrical padding */
    padding-bottom: 1%;
    background-color: #e6e6e6;
    display: flex; /* Make it a flex container */
    justify-content: space-between; /* Push children to ends */
    align-items: flex-start; /* Align children to the top */
    gap: 1%; /* Space between .post__content1 and #Nalepnice */

}

.post__content {
    max-width: 100%;
    padding-top: 0;
}

.post__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.post__title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post__title a:hover {
    color: #007bff;
}

.post__subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
}

.post__subtitle1 {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
    margin: 0;
}

/* Hide mobile-specific subtitle by default */
.post__subtitle1_mobile {
    display: none;
}


.post__description {
    font-size: 16px;
    color: #777;
    line-height: 1.6;
    font-weight: 500;
}

/* Styling for the right-aligned box with text and image */
/* #Nalepnice is now primarily a positioning wrapper for .post__content2 */
#Nalepnice {
    /* Removed display:flex, background, padding, specific alignments, margin-left, width, border-radius */
    /* These are now mostly on .post__content2 or handled by parent flex */
    flex-shrink: 0; /* Prevent this section from shrinking if .post__content1 is long */
    max-width: 50%; 
    border-radius: 8px;  /* Constrain the maximum width of this section */
}
/* New rule for .post__content2, which is the actual styled box */
.post__content2 {
    display: flex;
    flex-direction: row;
    background-color: #ffe5cc; /* Your preferred background */
    padding: 10px 15px;
    align-items: stretch; /* Changed from center to make items fill height */
    justify-content: space-between;
    width: 107%; /* Changed from fit-content to fill #Nalepnice */
    border-radius: 2px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
}
.post__content2 .nalepnice_post_subtitle{
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start; /* Corrected from 'left' */
    flex: 1; /* Takes remaining space; removed width: 60% */
    height: 100%;
}

/* Styles for the text paragraph on the left side within .post__content2 */
.post__content2 .post__subtitle2 { /* Selector changed from #Nalepnice .post__subtitle2 */
    font-size: 18px;
    color: #8d4d04;
    font-weight: 600;
    margin: 0;                  /* Remove default paragraph margins */
    margin-right: 10px;         /* Added space between text and image */
    overflow-wrap: break-word;  /* Allow long words to break and wrap */
    white-space: normal;        /* Ensure default text wrapping behavior */
}
.post__content2 .post__subtitle2 img{
    height: auto;
    width: 80%;
}
.post__content2 .post__subtitle3{
    color: #695a46;
    font-weight: 600;
    margin: 0;
    overflow-wrap: break-word;
    padding-right: 1%;
}

/* Styles for the image container on the right side within .post__content2 */
.post__content2 .post__image_nalepnice { /* Selector changed from #Nalepnice .post__image_nalepnice */
    flex: 0 0 40%; /* Do not grow, do not shrink, basis is 50%. Replaces width: 200px */
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    /* flex-shrink: 0; is covered by flex shorthand */
}

.manufacturers-container {
    display: flex;
    min-height: 100vh; 
    width: 100%;
    padding-top: 0;
    z-index: 1001;
    background-color: #e6e6e6;
}

.manufacturer-section {
    flex: 1;
    position: relative;
}

.manufacturer-section:last-child {
    border-right: none;
}

.manufacturer-title {
    text-align: center;
    padding: 30px 0;
    background: #f8f9fa;
    position: sticky;
    top: 10vh;
    z-index: 100;
    transform: translateZ(0);
    will-change: transform;
}
#manufacturer1 {
    background-color: #ffffff;
    z-index: 1002;
}
#manufacturer1 .manufacturer-title{
    background-color: #ffffff;
    height: 17vh;
    
}


#manufacturer2 {
    background-color: #6d6c6c;
    margin-top: 2%;
    z-index: 1001;
}
#manufacturer2 .h2{
    background-color: #6d6c6c;
}
#manufacturer2 .manufacturer-title{
    background-color: #6d6c6c;
}
#manufacturer2 .wrap{
    background-color: #6d6c6c;
}
#manufacturer2 .wrap .post__subtitle{
    color: #ffffff;
}


#manufacturer3 {
    background-color: #ffffff;
    z-index: 1000;
}

#manufacturer3 .manufacturer-title {
    height: 17vh;
    background-color: white;
}
#manufacturer3 .manufacturer-title img{
    padding-top: 5%;
    transform: scale(1.5);
}




#manufacturer4 {
    background-color: #525252   ;
    margin-top: 2%;
}
#manufacturer4 .manufacturer-title{
    background-color: #525252;
}
#manufacturer4 .wrap{
    background-color: #525252;
}
#manufacturer4 .wrap .post__subtitle{
    color: #ffffff;
}

.download-box {
    max-width: 300px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.download-box .photo {
    margin-bottom: 15px;
}

.download-box .photo img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;

}

.download-box .photo img:hover {
    transform: scale(1.05);
}

.download-box .download-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.download-box ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.download-box ul li {
    margin: 5px 0;
    color: #666;
}

.download-box .button.red {
    display: inline-block;
    padding: 10px 25px;
    background-color: #e31e24;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.download-box .button.blue {
    display: inline-block;
    padding: 10px 25px;
    background-color: #267ecf;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.download-box .button.gray {
    display: inline-block;
    padding: 10px 25px;
    background-color: #6d6c6c;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}
.download-box .button.darkgray {
    display: inline-block;
    padding: 10px 25px;
    background-color: #525252;
    color: white;
    text-decoration: none;
    border-radius: 4px;

    transition: background-color 0.3s ease;
}
.download-box .button.red:hover {
    background-color: #c41920;
}
.download-box .button.blue:hover {
    background-color: #2a62ac;
}
.download-box .button.gray:hover {
    background-color: #5f5d5d;
}
.download-box .button.darkgray:hover {
    background-color:  #3b3b3b;
}
.container_footer{
    /* background-color: #e6e6e6; Removed, sections will have own backgrounds */
    /* padding: 2% 5%; Removed, sections will have own padding */
    z-index: 1000;
    display: flex;
    flex-direction: row; /* Side-by-side for desktop */
    /* align-items: center; Removed, sections will stretch or align internally */
    /* text-align: center; Removed, sections will align internally */
    /* gap: 20px; Removed, no gap needed if sections fill width */
}

.footer-section {
    flex: 1; /* Each section takes equal width */
    padding: 25px 20px; /* Generous padding within each section */
    min-height: 150px; /* Ensure a minimum height for visual balance */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Contrasting Background Colors */
.footer-section-1 {
    background-color: #ffffff; /* Dark gray, contrasts with white manufacturer section */
    color: #f0f0f0; /* Light text for dark background */
}

.footer-section-2 {
    background-color: #ffffff; /* Light gray, contrasts with dark gray manufacturer section */
    color: #333; /* Dark text for light background */
}

.footer-section-3 {
    background-color: #525252; /* Dark gray */
    color: #f0f0f0; /* Light text */
}

.footer-section-4 {
    background-color: #525252; /* Light gray */
    color: #ffffff; /* Dark text */
}

/* Styling for content within footer sections */
.footer-section h3 {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Link styling specific to footer sections for contrast */
.footer-section-1 a, .footer-section-3 a {
    color: #add8e6; /* Light blue for dark backgrounds */
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.3em;
    font-weight: bold;
}
.footer-section-1 a:hover, .footer-section-3 a:hover {
    color: #ffffff; /* White on hover for dark backgrounds */
    
}

.footer-section-2 a, .footer-section-4 a {
    color: #0056b3; /* Standard blue for light backgrounds */
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.3em;
    font-weight: bold;
}
.footer-section-2 a:hover, .footer-section-4 a:hover {
    color: #007bff; /* Brighter blue on hover for light backgrounds */
}

.copyright_text {
    font-size: 0.9em;
    /* color: #555; Color will be inherited from .footer-section-1 */
}

/* Remove old .contact-info styles as they are now handled by .footer-section direct children */
/* .contact-info, .contact-info h3, .contact-info p, .contact-info a styles removed or integrated */

@media (min-width: 1230px) and (max-width: 1360px) {
    nav .container {
        gap: 16%;
        padding-left: 0;
    }
}
/* Update responsive styles */
@media (max-width: 1230px) {
    .menu-toggle {
        display: block;
    }

    nav .container {
        width: 90%;
        gap: 11%;
        padding-left: 0;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -60%;
        width: 60%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 20px 20px 20px;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transform: translateX(0);
    }

    .nav-links.active {
        transform: translateX(100%);
    }

    .nav-links li {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }
    .nav-links.mobile-nav .mobile-contact-item {
        padding: 2px 0; /* Compact vertical padding; horizontal padding is from UL */
        border-bottom: none; /* No borders between these compact contact items */
        text-align: left;
        list-style-type: none; /* Ensure no bullets */
    }

    /* Email */
    .nav-links.mobile-nav .mobile-contact-item.contact-email {
        padding-top: 10px; /* Add some space before the first contact item */
        padding-bottom: 5px; /* Space after email */
    }
    .nav-links.mobile-nav .mobile-contact-item.contact-email a {
        color: #0056b3;
    } 

    /* Tel: / GSM: Labels */
    .nav-links.mobile-nav .mobile-contact-item.contact-section-label {
        font-weight: bold;
        padding-top: 8px; /* Space above label */
        padding-bottom: 1px; /* Space below label */
    }

    /* Telephone Numbers */
    .nav-links.mobile-nav .mobile-contact-item.tel-number {
        padding-top: 1px;
        padding-bottom: 1px;
    }
    .nav-links.mobile-nav .mobile-contact-item.tel-number a{
        color: #0056b3;
    }
    /* Space after the block of tel numbers */
    .nav-links.mobile-nav .mobile-contact-item.tel-number:last-of-type { /* Targets the second tel-number li */
        padding-bottom: 8px; 
    }

    /* GSM Entries */
    .nav-links.mobile-nav .mobile-contact-item.gsm-entry {
        padding-top: 1px;
        padding-bottom: 1px; /* Compact spacing for each GSM line */
    }
    .nav-links.mobile-nav .mobile-contact-item.gsm-entry .gsm-number-link {
        display: block; /* GSM number on its own line */
    }
    .nav-links.mobile-nav .mobile-contact-item.gsm-entry a{
        color: #0056b3;
    }
    .nav-links.mobile-nav .mobile-contact-item.gsm-entry .social-links-inline {
        display: block; /* WhatsApp/Viber on line below number */
        margin-top: 1px; /* Tiny space above social links */
    }
    .nav-links.mobile-nav .mobile-contact-item.gsm-entry .social-links-inline a {
        margin: 0 3px; /* Space between WhatsApp and Viber */
        color: #818181;
        /* text-decoration: none; /* Or underline, as preferred */
    }
    
    /* Ensure the very last item in the mobile nav has no bottom border */
    /* This is important if the general .nav-links li rule adds one */
    .nav-links.mobile-nav > li:last-child {
      border-bottom: none;
    }

    .manufacturers-container {
        flex-direction: column;
    }

    .manufacturer-section {
        min-height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .manufacturer-section:last-child {
        border-bottom: none;
    }

    /* Stack .post__content1 and #Nalepnice vertically */
    .post__content1{
        max-width: 100%;
    }

    /* Allow #Nalepnice to take full width in stacked layout */
    #Nalepnice {
        max-width: 100%; /* Or 'none' */
    }
    .post__content-wrap1{
        flex-direction: column;
        padding-bottom: 0;
        padding-right: 2%;
    }
    .post__content2{
        padding-left: 5%;
        padding-right: 2%;
        width: 102%;
        height:  30vh;
        padding-bottom: 5vh;

    }
    .post__subtitle1_mobile{
        font-size: 18px;
        color: #666;
        margin-bottom: 20px;
        font-weight: 600;
        margin: 0;
        display: block; /* Changed from contents to block for standard paragraph display */
        padding-bottom: 10%;
    }
    .post__subtitle1{
        display:none;
    }
    .post__content2 .post__subtitle2 img{
        height: auto;
        width: 100%;
    }
    .container_footer {
        flex-direction: column; /* Stack sections vertically */
    }

    .footer-section {
        min-height: auto; /* Allow height to adjust to content on mobile */
        padding: 20px; /* Slightly reduce padding for mobile */
    }
    .footer-section-1 {
        padding: 0;
        height: 0;
    }
}

@media (min-width: 600px) and (max-width: 1230px) {
  section.manufacturer-section .wrap {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns for the 2x2 layout */
    /* gap: 20px; */ /* This is inherited from the global .wrap style */
  }

  section.manufacturer-section .wrap .post:first-child {
    grid-column: 1 / span 2; /* Make the first post span both columns */
    /* You might want to adjust padding or image height for the first post if it looks too stretched */
  }

  section.manufacturer-section .wrap .download-box {
    grid-column: 1 / span 2; /* Make the download box span both columns */
    /* The global style `margin: 40px auto;` on .download-box will handle the centering */
    /* If margin: auto doesn't work as expected due to grid interactions, you could also try: */
    /* justify-self: center; */
  }
  .nav-links {

    left: -40%;
    width: 40%;
    }
    .nav-links.mobile-nav .mobile-contact-item {
        font-size: 1.1em;
        text-align: left;
    }

  /* Ensure that if there are more than 5 posts, they continue in the 2-column layout */
  /* This is the default behavior with the grid setup above, so no extra rule needed unless specific styling is required for posts 2-5 only. */
}
@media (max-width: 410px) {
    .post__subtitle3{
        font-size: 0.95em;
    }
    .post__content2{
        height: 36vh;
    }
    .mobile-contact-item{
        font-size: 0.9em
    }
    .mobile-contact-item.contact-email{
        font-size: 0.8em
    }

}
@media (max-width: 335px) {
    .nav-links {

        left: -80%;
        width: 80%;
    
    }
    .post__subtitle3{
        font-size: 0.85em;
    }
    .nav-links.mobile-nav .mobile-contact-item {
        font-size: 0.9em;
        text-align: center;
    }
    .nav-links.mobile-nav .mobile-contact-item.contact-email {
        font-size: 0.7em;
        text-align: center;
    }

    
    
}
@media (min-width: 1026px) and (max-width: 1230px) {
    .post__content1{
        width: 100%;
    }
    #Nalepnice{
        width: 100%;
    }
    .post__content2{
        padding-right: 2%;
    }
}
@media (width: 344px) and (height: 882px) {
    .menu-toggle{
        padding-left: 0;
    }
    nav .container{
        padding-left: 0;

    }
}