/* Custom styles for additional pages */

/* Reset and base styles for content pages */
.contentArea section {
    margin-bottom: 30px;
    padding: 0;
}

.contentArea section article {
    padding: 20px;
    background: #fff;
}

/* Sections with IDs get special styling */
.contentArea section[id] {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 5px;
    margin-bottom: 25px;
}

.contentArea section[id] article {
    background: #f9f9f9;
    padding: 20px 25px;
}

/* Alternate background colors for better visual separation */
.contentArea section[id]:nth-of-type(odd) {
    background: #f5f5f5;
}

.contentArea section[id]:nth-of-type(odd) article {
    background: #f5f5f5;
}

/* First section - default styling (fallback for browsers without :has() support) */
.contentArea > section:first-child {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 5px;
    margin-bottom: 25px;
}

.contentArea > section:first-child article {
    background: #f5f5f5;
    padding: 20px 25px;
}

/* First section with hero feature - override to remove padding */
.contentArea > section:first-child .heroFeature {
    margin: -5px;
    border-radius: 6px;
}

.contentArea > section:first-child:has(.heroFeature) {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.contentArea > section:first-child:has(.heroFeature) article {
    background: transparent;
    padding: 0;
}

/* Section without ID but not first (general content sections) */
.contentArea > section:not([id]):not(:first-child) {
    background: #f9f9f9;
    padding: 5px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.contentArea > section:not([id]):not(:first-child) article {
    padding: 20px 25px;
    background: #f9f9f9;
}

/* Alternate colors for sections without ID */
.contentArea > section:not([id]):not(:first-child):nth-of-type(even) {
    background: #f5f5f5;
}

.contentArea > section:not([id]):not(:first-child):nth-of-type(even) article {
    background: #f5f5f5;
}

.contentArea h1 {
    font-size: 2em;
    color: #1f36c7;
    margin: 0 0 15px 0;
    padding: 0;
}

.contentArea h2 {
    font-size: 1.5em;
    color: #1f36c7;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid #1f36c7;
}

/* H2 inside sections with ID - no top margin needed */
.contentArea section[id] h2 {
    margin-top: 0;
}

.contentArea h3 {
    font-size: 1.2em;
    color: #333;
    margin: 15px 0 10px 0;
}

.contentArea p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.contentArea p.intro {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
}

.contentArea ul,
.contentArea ol {
    margin: 0 0 20px 5px;
    padding: 0;
}

.contentArea ul li,
.contentArea ol li {
    margin-bottom: 8px;
    padding-left: 15px;
    line-height: 1.6;
    background-position: 0 0.45em;
}

/* Hero feature for subpages */
.contentArea .heroFeature {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.contentArea .heroFeature .heroContent {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.contentArea .heroFeature .heroContent .details {
    flex: 1;
    min-width: 300px;
}

.contentArea .heroFeature .heroContent .media {
    flex: 0 0 auto;
}

.contentArea .heroFeature .heroContent .media img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Column layout fixes */
.contentArea .columnGroup00 {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin: 25px 0;
    padding: 0;
}

.contentArea .columnGroup00 > section {
    flex: 1;
    min-width: 280px;
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.contentArea .columnGroup00 .column {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 6px;
    height: 100%;
    box-sizing: border-box;
}

.contentArea .columnGroup00 .column h3 {
    margin-top: 0;
    color: #1f36c7;
    border-bottom: 2px solid #1f36c7;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.contentArea .columnGroup00 .column ul {
    margin: 0 0 0 5px;
    padding: 0;
}

.contentArea .columnGroup00 .column ul li {
    padding: 8px 0 8px 15px;
    border-bottom: 1px solid #e0e0e0;
    background-position: 0 0.9em;
}

.contentArea .columnGroup00 .column ul li:last-child {
    border-bottom: none;
}

.contentArea .columnGroup00 .column article {
    padding: 0;
    background: transparent;
}

/* Brand logos grid */
.brand-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.brand-logos img {
    border-radius: 4px;
    transition: transform 0.2s;
}

.brand-logos img:hover {
    transform: scale(1.05);
}

/* News items */
.companyNews .news {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.companyNews .news:last-child {
    border-bottom: none;
}

.companyNews .newsitem h3 {
    margin: 0 0 5px 0;
}

.companyNews .newsitem p {
    margin: 0;
    color: #666;
}

.companyNews .newsitem p.date {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 10px;
}

/* FAQ items */
.faq-item {
    margin-bottom: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 4px solid #1f36c7;
}

.faq-item h3 {
    margin: 0 0 12px 0;
    color: #1f36c7;
    font-size: 1.1em;
}

.faq-item p {
    margin: 0;
    line-height: 1.6;
}

.faq-item p a {
    color: #1f36c7;
}

/* News module in companyNews */
.companyNews .module {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

/* Contact form styles */
#contactForm .form-group {
    margin-bottom: 20px;
}

#contactForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm select,
#contactForm textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

#contactForm textarea {
    resize: vertical;
    min-height: 120px;
}

#contactForm button.btn {
    background: #1f36c7;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}

#contactForm button.btn:hover {
    background: #162a9e;
}

/* Address styling */
.contentArea address {
    font-style: normal;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Image with text flow */
.contentArea .media img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Media positioning classes */
.media-right {
    float: right;
    margin: 0 0 20px 20px;
}

.media-left {
    float: left;
    margin: 0 20px 20px 0;
}

.media-block {
    display: block;
    margin-bottom: 15px;
}

.clearfix {
    clear: both;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Sitemap styles */
.mapa-strony .column h3 {
    margin-top: 0;
}

.mapa-strony .column ul {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.mapa-strony .column ul {
    list-style: none;
    margin-left: 0;
}

.mapa-strony .column ul li {
    margin-bottom: 5px;
    padding-left: 18px;
    position: relative;
}

.mapa-strony .column ul li:before {
    content: "›";
    position: absolute;
    left: 0;
    top: 0;
    color: #1f36c7;
    font-size: 1.3em;
    font-weight: bold;
    line-height: 1.2;
}

/* Footer fixes */
#pageFooter .navigation {
    padding: 20px 0;
}

#pageFooter .linklist {
    margin-bottom: 20px;
}

#pageFooter .promo {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

#pageFooter .promo img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .contentArea .heroFeature .heroContent {
        flex-direction: column;
    }

    .contentArea .heroFeature .heroContent .media {
        order: -1;
        width: 100%;
    }

    .contentArea .heroFeature .heroContent .media img {
        width: 100%;
    }

    .contentArea .columnGroup00 {
        flex-direction: column;
    }

    .contentArea .columnGroup00 .column {
        min-width: 100%;
    }

    .contentArea .media[style*="float"] {
        float: none !important;
        margin: 0 0 15px 0 !important;
    }

    .brand-logos {
        justify-content: center;
    }

    /* Mobile padding adjustments */
    .contentArea section[id] article {
        padding: 15px;
    }

    .contentArea > section:first-child:not(:has(.heroFeature)) article {
        padding: 15px;
    }

    .contentArea > section:not([id]):not(:first-child) article {
        padding: 15px;
    }

    .contentArea .columnGroup00 .column {
        padding: 15px;
    }

    .faq-item {
        padding: 15px;
    }

    #contactForm input[type="text"],
    #contactForm input[type="email"],
    #contactForm input[type="tel"],
    #contactForm select,
    #contactForm textarea {
        max-width: 100%;
    }
}

/* Print styles */
@media print {
    .contentArea .heroFeature {
        background: none;
        border: 1px solid #ccc;
    }

    .brand-logos img {
        max-width: 80px;
    }
}
