/* CSS Variables for WCAG 2.1 Accessibility */
:root {
    --primary-color: #3663a5;
    --primary-dark: #2a4d7a;
    --text-color: #333333;
    --background: #ffffff;
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
    --font-size-xlarge: 20px;
}

/* High Contrast Theme */
html.high-contrast {
    --primary-color: #ffff00;
    --primary-dark: #ffff00;
    --text-color: #ffff00;
    --background: #000000;
}

html.high-contrast * {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

html.high-contrast .hero-section::before {
    background: rgba(0,0,0,0.8) !important;
}

html.high-contrast .about-section {
    background-color: #000000 !important;
}

html.high-contrast .contact-section {
    background: #000000 !important;
}

html.high-contrast .page-preloader {
    background: #000000 !important;
}

html.high-contrast .preloader-spinner {
    border-color: #333333 !important;
    border-top-color: #ffff00 !important;
}

html.high-contrast .preloader-text {
    color: #ffff00 !important;
}

html.high-contrast .contact-card {
    background: #000000 !important;
    border-color: #ffff00 !important;
}

html.high-contrast .cta-section {
    background: #000000 !important;
}

html.high-contrast .cta-button {
    background: #ffff00 !important;
    color: #000000 !important;
}

html.high-contrast .map-container iframe {
    filter: invert(1) hue-rotate(180deg);
}

/* Service List Styles */
.service-list {
    margin-top: 1.5em;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.8em 0;
    border-bottom: 1px solid #eee;
    gap: 1em;
}
.service-item h3 {
	margin-left: auto;
	margin-right: auto;
}
.service-item:last-child {
    border-bottom: none;
}

.service-name {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.4;
}

.service-price {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    font-size: 0.95em;
}

.service-icon {
    text-align: center;
    margin-bottom: 1em;
}

.service-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.service-icon i {
    font-size: 2.5em;
    color: #666;
}

.contact-details {
    text-align: center;
}

.contact-details address {
    font-style: normal;
    line-height: 1.6;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* High contrast for service items */
html.high-contrast .service-item {
    border-bottom-color: #ffff00 !important;
}

html.high-contrast .service-price {
    color: #ffff00 !important;
}

/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* Service Box Styles */
.service-box {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-box:hover {
    box-shadow: 0 10px 30px rgba(54, 99, 165, 0.15);
    border-color: var(--primary-dark);
}

/* Service Category Styles - keep for backward compatibility */
.service-category {
    margin-bottom: 3em;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 1.5em;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.service-header .service-icon {
    margin-bottom: 0;
}

.service-header .service-icon img {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
}

.service-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

/* Service Box Header */
.service-box-header {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    color: white;
    padding: 20px;
    gap: 15px;
}

.service-box-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.2;
    min-height: 2.4em;
    display: flex;
    align-items: center;
}

.service-box-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.service-box-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Service Box List */
.service-box-list {
    padding: 20px;
    flex: 1;
}

.service-box-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.service-box-item:last-child {
    border-bottom: none;
}

.service-box-name {
    flex: 1;
    font-size: 0.9em;
    line-height: 1.4;
    color: #333;
}

.service-box-price {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    font-size: 0.9em;
}

/* Article Content Styles */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1em;
}

.article-content h4 {
    color: var(--primary-color);
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.3em;
    font-weight: 600;
}

.article-content h2 {
    color: var(--primary-color);
    margin-top: 2.5em;
    margin-bottom: 1.5em;
    font-size: 1.5em;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 1.5em;
    text-align: justify;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact Details Styles */
.contact-details {
    text-align: center;
}

.contact-details p {
    margin-bottom: 0.5em;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-details a:hover {
    text-decoration: underline;
}

.mt-40 {
    margin-top: 40px;
}

/* Contact Map Styles */
.contact-map {
    margin: 40px 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid var(--primary-color);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* OpenStreetMap iframe styling */
iframe[src*="openstreetmap"] {
    margin: 40px 0;
    border-radius: 0;
    border: 2px solid var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Contact Boxes Styles */
.contact-boxes-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px 0;
}

.contact-box {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(54, 99, 165, 0.15);
    border-color: var(--primary-dark);
}

.contact-box-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: white;
    position: relative;
}



.contact-box-icon .icon-fallback {
    display: none;
    font-size: 24px;
    color: white;
}





.contact-box h3 {
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.contact-box-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-box-content p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.contact-box-content p strong {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.contact-box-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-box-content a:hover {
    text-decoration: underline;
}

.contact-box-content address {
    font-style: normal;
    line-height: 1.4;
}

.contact-box .opening-hours {
    text-align: left;
}

.contact-box .hours-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.contact-box .day {
    font-weight: 600;
}

.contact-box .time {
    color: var(--primary-color);
}

/* Contact Description Box */
.contact-description-box {
    background: #f8f9fa;
    border: 2px solid var(--primary-color);
    border-radius: 0;
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

.contact-description-content h3 {
    color: var(--primary-color);
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 25px;
}

.contact-description-content p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
}

.contact-description-content p:last-child {
    margin-bottom: 0;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive adjustments for service items */
@media (max-width: 1024px) and (min-width: 769px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-box-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .service-box-header h2 {
        min-height: 2.8em;
        justify-content: center;
    }
    
    .service-box-list {
        padding: 15px;
    }
    
    .service-box-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 10px 0;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
    
    .service-price {
        font-size: 1em;
        font-weight: 700;
    }
    
    .service-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5em;
    }
    
    .service-category {
        margin-bottom: 2em;
    }
    
    .article-content {
        font-size: 1em;
    }
    
    .article-content h4 {
        font-size: 1.2em;
    }
    
    .article-content h2 {
        font-size: 1.4em;
    }
    
    /* Contact map responsive */
    iframe[src*="openstreetmap"] {
        height: 300px !important;
        margin: 30px 0;
    }
    
    /* Contact boxes responsive */
    .contact-boxes-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-box {
        min-height: auto;
        padding: 25px 20px;
    }
    
    .contact-description-box {
        padding: 30px 20px;
    }
    
    .contact-description-content h3 {
        font-size: 1.5em;
    }
    
    .contact-description-content p {
        font-size: 1em;
        text-align: left;
    }
    
    .contact-description-content p:last-child {
        text-align: center;
    }
}

/* Font Size Classes */
html.font-small {
    --font-size-base: 14px;
    --font-size-small: 12px;
    --font-size-large: 16px;
    --font-size-xlarge: 18px;
}

html.font-large {
    --font-size-base: 18px;
    --font-size-small: 16px;
    --font-size-large: 20px;
    --font-size-xlarge: 22px;
}

html.font-xlarge {
    --font-size-base: 20px;
    --font-size-small: 18px;
    --font-size-large: 22px;
    --font-size-xlarge: 24px;
}

/* Spacing accessibility classes */
html.letter-spacing-wide * {
    letter-spacing: 0.1em;
}

html.line-height-wide * {
    line-height: 2;
}

html.word-spacing-wide * {
    word-spacing: 0.3em;
}

html.paragraph-spacing-wide p {
    margin-bottom: 2em;
}

html.paragraph-spacing-wide .service-description,
html.paragraph-spacing-wide .section-subtitle,
html.paragraph-spacing-wide .hero-content p {
    margin-bottom: 2em;
}





/* Preloader Styles - backup in case inline styles fail */
.page-preloader {
    display: none !important;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: preloader-spin 1s linear infinite;
}

.preloader-text {
    margin-top: 20px;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #666;
    font-size: 14px;
}

@keyframes preloader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body:not(.fonts-loaded) .main-content {
    visibility: hidden;
}

body.fonts-loaded .page-preloader {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Zapobiega CLS podczas ładowania */
#top {
    min-height: 90px; /* Rezerwuje miejsce dla header */
}

.main-nav {
    min-height: 50px; /* Rezerwuje miejsce dla menu */
}

.mobile-controls {
    min-width: 100px; /* Rezerwuje miejsce dla przycisków */
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -48px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10000;
    font-weight: 600;
}

.skip-link:focus {
    top: -4px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Article Content Styles */
.content-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-content {
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--primary-color);
}

.article-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: var(--primary-color);
}

.article-content p {
    margin-bottom: 1.2em;
}

.article-content ul, .article-content ol {
    margin: 1.2em 0;
    padding-left: 2em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content blockquote {
    margin: 2em 0;
    padding: 1em 2em;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 3em 0;
    padding: 2em;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1em;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white !important;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    min-width: 150px;
    text-align: center;
}

.cta-button:hover {
    background-color: var(--primary-dark);
}

/* Map Section */
.map-section {
    padding: 2em 0;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Contact Info Section */
.contact-info-section {
    padding: 3em 0;
    background-color: #f8f9fa;
}

.contact-card {
    text-align: center;
    padding: 2em 1em;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 1em;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 1em;
    font-size: 1.2em;
}

.contact-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-details p {
    margin-bottom: 0.5em;
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-details address {
    font-style: normal;
    line-height: 1.6;
}

/* Additional Links Section */
.additional-links-section {
    padding: 2em 0;
}

/* Responsive adjustments for contact cards */
@media (max-width: 768px) {
    .contact-info-section .row {
        flex-direction: column;
    }
    
    .contact-info-section .col-3 {
        flex: 0 0 100%;
        margin-bottom: 1em;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 250px;
    }
}


body {
    font-family: 'Open Sans',Helvetica,sans-serif;    
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    font-size: var(--font-size-base);
    font-display: swap;
}

/* Elementy, które powinny reagować na zmianę rozmiaru czcionki */
p, .service-description, .about-content p, .seo-content p, 
.modal-body, .price-item, .section-subtitle, .gallery-subtitle,
.contact-subtitle {
    font-size: var(--font-size-base) !important;
}

h1, h2, h3, h4, h5, h6 {
    font-size: calc(var(--font-size-base) * 1.5) !important;
}

.hero-content h1 {
    font-size: calc(var(--font-size-base) * 3.5) !important;
    font-weight: 300 !important;
}
.hero-content p {
    font-size: calc(var(--font-size-base) * 1.5) !important;
    font-weight: 300 !important;
}
.section-title {
    font-size: calc(var(--font-size-base) * 2) !important;
}

.contact-title {
    font-size: calc(var(--font-size-base) * 2.2) !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
}

.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* Header Styles */
#header-secondary-outer {
    background-color: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

#header-secondary-outer nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

#header-secondary-outer nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 5px 15px;
    font-size: 14px;
}

#header-secondary-outer nav ul li a:hover {
    color: #3663a5;
}

/* Accessibility Controls - przeniesione do header */
.accessibility-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    font-size: 12px;
}

.font-size-controls, .contrast-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.font-size-btn, .contrast-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    min-width: 24px;
    text-align: center;
}

.font-size-btn:hover, .contrast-btn:hover,
.font-size-btn.active, .contrast-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.accessibility-controls span {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
}

#top {
    background-color: var(--background);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

#top .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#top .col-9 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.mobile-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#logo img {
    max-height: 50px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
}

.main-nav ul li {
    margin: 0 20px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.current {
    color: #3663a5;
}

.main-nav ul li a.current {
    border-bottom: 2px solid #3663a5;
    padding-bottom: 3px;
}

.phone-button {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 12px 25px;
    border: none !important;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.phone-button:hover {
    background-color: var(--primary-dark) !important;
    color: white !important;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 1001;
}

/* Icon fallback styles */
.icon-fallback {
    display: none;
}



/* Accessibility Menu Toggle - Desktop */
.accessibility-menu-toggle {
    display: block; /* Pokaż na desktop */
    background: var(--primary-color) !important;
    color: white !important;
    font-size: 20px;
    padding: 1px 5px;
    border: 2px solid var(--primary-color) !important;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    z-index: 10;
    min-width: 34px;
    min-height: 34px;
    transition: all 0.3s ease;
    margin-right: 8px;
}
.mobile-menu-toggle .menu-lines{
    display:flex;
    justify-content:center;
    align-items:center;
    background-image: url('../assets/images/menu-btn-black.svg');
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.high-contrast .mobile-menu-toggle .menu-lines{
    background-image: url('../assets/images/menu-btn-hc.svg?a=1');
}
.accessibility-menu-toggle .menu-accessibility {
    display:flex;
    justify-content:center;
    align-items:center;
    background-image: url('../assets/images/accessibility.svg');
    background-size: 36px 36px;
    width: 36px;
    height: 36px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.high-contrast .accessibility-menu-toggle .menu-accessibility{
    background-image: url('../assets/images/accessibility-hc.svg?a=1');
}
.accessibility-menu-toggle:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
}



/* Desktop - pokaż accessibility button */
@media (min-width: 1101px) {
    /* Na desktop pokaż główne menu */
    .main-nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .accessibility-menu-toggle {
        display: block; /* Pokaż na desktop */
    }
    
    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    /* Na desktop ukryj hamburger menu */
    .mobile-menu-toggle {
        display: none;
    }
    
    /* Header right layout na desktop */
    .header-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
}

/* Mobile Menu Slide-in */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: var(--primary-color);
    z-index: 10002;
    transition: right 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.mobile-menu-panel.show {
    right: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.mobile-menu-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-nav ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-menu-nav ul li a:hover,
.mobile-menu-nav ul li a.current {
    color: #ffeb3b;
}

.mobile-phone-button {
    display: block;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.mobile-phone-button:hover {
    background: #f0f0f0;
}

/* Mobile Accessibility Controls */
.mobile-accessibility-controls {
    display: none; /* Hidden by default */
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-accessibility-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.mobile-font-controls,
.mobile-contrast-controls {
    margin-bottom: 20px;
}

.mobile-font-controls span,
.mobile-contrast-controls span {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 8px;
}

.mobile-font-controls .font-size-btn,
.mobile-contrast-controls .contrast-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    margin-right: 8px;
    margin-bottom: 8px;
}

.mobile-font-controls .font-size-btn:hover,
.mobile-font-controls .font-size-btn.active,
.mobile-contrast-controls .contrast-btn:hover,
.mobile-contrast-controls .contrast-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* Hero Section */
.hero-section {
    height: 650px;
    background-image: url('https://andandent.pl/wp-content/uploads/2020/01/P1520559-Editpage_.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 100%;
}

.hero-content h1 {
    font-size: 60px;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* Services Section */
.services-section {
    padding: 80px 0;
    background-color: #ffffff;
}

/* Services responsive grid */
/* Desktop - 4 kolumny */
@media (min-width: 1200px) {
    .services-section .row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        margin: 0;
    }

    .services-section .col-3 {
        padding: 0;
        display: flex;
    }
    
    .services-section .service-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 280px;
    }
    
    /* Dla podstron - wyłącz grid */
    .services-section.article-page .row {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .services-section.article-page .col-3 {
        padding: 0 0 30px 0;
        display: block;
    }
}

/* Tablet duży - 3 kolumny */
@media (min-width: 900px) and (max-width: 1199px) {
    .services-section .row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        margin: 0;
    }

    .services-section .col-3 {
        padding: 0;
        display: flex;
    }
    
    .services-section .service-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 260px;
    }
    
    /* Contact boxes - 4 kolumny na dużym tablecie (pozostaje 4) */
    .contact-boxes-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .contact-box {
        padding: 25px 15px;
        min-height: 220px;
    }
    
    .contact-box-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
	
    /* Dla podstron - wyłącz grid */
    .services-section.article-page .row {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    
    .services-section.article-page .col-3 {
        padding: 0 0 30px 0;
        display: block;
    }
}
/* Tablet średni - 2 kolumny */
@media (min-width: 600px) and (max-width: 899px) {
    .services-section .row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin: 0;
    }

    .services-section .col-3 {
        padding: 0;
        display: flex;
    }
    .services-section .service-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 240px;
    }
    
    /* Contact boxes - 2 kolumny na tablecie */
    .contact-boxes-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .contact-description-content p {
        text-align: left;
    }
    /* Dla podstron - wyłącz grid */
    .services-section.article-page .row {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    .services-section.article-page .col-3 {
        padding: 0 0 30px 0;
        display: block;
    }
}
/* Mobile - 1 kolumna */
@media (max-width: 599px) {
    .services-section .row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 0;
    }

    .services-section .col-3 {
        padding: 0;
        display: flex;
    }
    
    .services-section .service-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 200px;
    }
    /* Hide mobile accessibility controls - use separate accessibility menu */
    .mobile-accessibility-controls {
        display: none !important;
    }
    /* Dla podstron - wyłącz grid */
    .services-section.article-page .row {
        display: block;
        grid-template-columns: none;
        gap: 0;
    }
    .services-section.article-page .col-3 {
        padding: 0 0 30px 0;
        display: block;
    }
}

.section-title {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: rgba(10,10,10,0.65);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.service-item {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-item h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.service-description {
    font-size: var(--font-size-base);
    color: #333;
    line-height: 1.6;
    transition: color 0.3s ease;
    flex-grow: 1;
    text-align: center;
}


.cennik-button {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 4px; /* Minimalnie zaokrąglone rogi */
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    margin-top: 0;
}

.cennik-button:hover {
    background-color: var(--primary-dark);
}

/* Wyrównanie kolumny z przyciskiem cennik */
.service-item.cennik-column {
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding-top: 30px; /* Normalny padding jak inne boksy */
}

.service-item.cennik-column h3 {
    margin-top: 84px; /* 64px (ikona) + 20px (margin-bottom ikony) = 84px */
    margin-bottom: 15px; /* Odstęp przed przyciskiem */
}

.service-item.cennik-column h4 {
    margin-top: 84px; /* 64px (ikona) + 20px (margin-bottom ikony) = 84px */
    margin-bottom: 15px; /* Taki sam jak inne h4 */
}

/* About Section */
.about-section {
    padding: 60px 0;
    background-color: var(--primary-color);
    color: white;
}

.about-content {
    padding: 40px 0;
}

.about-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-images {
    position: relative;
    height: 500px;
}

.cascading-image {
    position: absolute;
    border-radius: 0; /* Usunięte zaokrąglone rogi */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cascading-image:nth-child(1) {
    top: 0;
    left: 0;
    width: 60%;
    height: 70%;
    background-color: #ffffff;
}

.cascading-image:nth-child(2) {
    top: 10%;
    right: 15%;
    width: 50%;
    height: 60%;
}

.cascading-image:nth-child(3) {
    bottom: 0;
    right: 0;
    width: 55%;
    height: 65%;
}

.cascading-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animacje dla zdjęć w sekcji about */
.cascading-image {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.cascading-image.animate {
    opacity: 1;
    transform: scale(1);
}

.cascading-image:nth-child(2).animate {
    transition-delay: 0.2s;
}

.cascading-image:nth-child(3).animate {
    transition-delay: 0.4s;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.gallery-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.gallery-divider {
    width: 40px;
    height: 2px;
    background-color: #3663a5;
    margin: 0 auto 20px;
}

.gallery-subtitle {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 60px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Gallery responsive grid */
/* Desktop - auto-fit z minimalną szerokością */
@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }
}

/* Tablet duży - 3 kolumny */
@media (min-width: 900px) and (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Tablet średni - 2 kolumny */
@media (min-width: 600px) and (max-width: 899px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile - 1 kolumna */
@media (max-width: 599px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0; /* Usunięte zaokrąglone rogi */
    aspect-ratio: 3/2;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(54, 99, 165, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-search-plus{
    display:flex;
    justify-content:center;
    align-items:center;
    background-image: url('../assets/images/zoom.svg');
    background-size: 30px 30px;
    width: 30px;
    height: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.gallery-overlay i {
    color: white;
    font-size: 24px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(rgba(47, 63, 84, 0.95), rgba(47, 63, 84, 0.95)), url('https://andandent.pl/wp-content/uploads/2020/01/P1520533-Edit.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.contact-title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.contact-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-button {
    background: transparent;
    color: #3663a5;
    border: 2px solid #3663a5;
    padding: 15px 40px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background-color: #3663a5;
    color: white;
}

/* SEO Content Section */
.seo-content {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.seo-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.seo-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #333;
}

.seo-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #555;
}

.seo-content a {
    color: #3663a5;
    text-decoration: underline;
}

.seo-content a:hover {
    text-decoration: underline;
}

/* Footer Section */
#footer-outer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0 20px;
}

#footer-outer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#footer-outer .col {
    flex: 1;
}

#footer-outer p {
    margin: 0;
    font-size: 14px;
}

#footer-outer a {
    color: white;
    text-decoration: none;
}

#footer-outer a:hover {
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.scroll-to-top.show {
    display: flex;
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}

.modal-close:hover {
    color: #3663a5;
}

.price-item {
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.price-item:last-child {
    border-bottom: none;
}

/* Image Gallery Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.image-modal-close:hover {
    color: #ccc;
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    z-index: 10001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-nav::before {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url('../assets/images/top-arrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1); /* Biały kolor */
}

.image-modal-nav:hover {
    background-color: rgba(255,255,255,0.3);
}

.image-modal-prev {
    left: 20px;
}

.image-modal-prev::before {
    transform: rotate(-90deg); /* Obrót w lewo */
}

.image-modal-next {
    right: 20px;
}

.image-modal-next::before {
    transform: rotate(90deg); /* Obrót w prawo */
}

.image-modal-nav i {
    display: none; /* Ukryj ikony FontAwesome */
}

/* Gallery image loader */
.image-modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10002;
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.image-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
}

/* Responsive Design */
@media (max-width: 1100px) {
    .accessibility-controls {
        display: none; /* Ukryj stare kontrolki - teraz są w osobnym menu */
    }

    #top .col-9 {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-right {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .main-nav {
        display: none; /* Ukryj główne menu */
    }
    
    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .mobile-menu-toggle {
        display: block;
        color: #333;
        font-size: 24px;
        padding: 8px 12px;
        background: none;
        border: 2px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        position: relative;
        z-index: 10;
        min-width: 44px;
        min-height: 36px;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        border-color: var(--primary-color);
        background-color: rgba(54, 99, 165, 0.1);
    }
    
    .accessibility-menu-toggle {
        display: block;
        color: white !important;
        font-size: 20px;
        padding: 5px 9px;
        background: var(--primary-color) !important;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        z-index: 10;
        min-width: 44px;
        min-height: 36px;
        transition: all 0.3s ease;
        margin-right: 8px;
    }
    .accessibility-menu-toggle:hover {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        color: white !important;
    }
}

/* Accessibility Menu Styles */
.accessibility-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accessibility-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.accessibility-menu-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 10004;
    transition: right 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto;
}

.accessibility-menu-panel.show {
    right: 0;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.accessibility-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--primary-color);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.accessibility-menu-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.accessibility-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}
.accessibility-menu-close img, .mobile-menu-close img{
    margin-top: 8px;
}
.accessibility-menu-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.accessibility-menu-content {
    padding: 30px 20px;
}

.accessibility-font-controls,
.accessibility-contrast-controls {
    margin-bottom: 40px;
}

.accessibility-font-controls h4,
.accessibility-contrast-controls h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.font-size-buttons,
.contrast-buttons,
.letter-spacing-buttons,
.line-height-buttons,
.word-spacing-buttons,
.paragraph-spacing-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.accessibility-menu-content .font-size-btn,
.accessibility-menu-content .contrast-btn,
.accessibility-menu-content .letter-spacing-btn,
.accessibility-menu-content .line-height-btn,
.accessibility-menu-content .word-spacing-btn,
.accessibility-menu-content .paragraph-spacing-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
    box-sizing: border-box;
}

.accessibility-menu-content .font-size-btn .btn-label,
.accessibility-menu-content .contrast-btn .btn-label,
.accessibility-menu-content .letter-spacing-btn .btn-label,
.accessibility-menu-content .line-height-btn .btn-label,
.accessibility-menu-content .word-spacing-btn .btn-label,
.accessibility-menu-content .paragraph-spacing-btn .btn-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
}

.accessibility-menu-content .font-size-btn .btn-description,
.accessibility-menu-content .contrast-btn .btn-description,
.accessibility-menu-content .letter-spacing-btn .btn-description,
.accessibility-menu-content .line-height-btn .btn-description,
.accessibility-menu-content .word-spacing-btn .btn-description,
.accessibility-menu-content .paragraph-spacing-btn .btn-description {
    font-size: 10px;
    color: #666;
}

.accessibility-menu-content .font-size-btn:hover,
.accessibility-menu-content .contrast-btn:hover,
.accessibility-menu-content .letter-spacing-btn:hover,
.accessibility-menu-content .line-height-btn:hover,
.accessibility-menu-content .word-spacing-btn:hover,
.accessibility-menu-content .paragraph-spacing-btn:hover,
.accessibility-menu-content .font-size-btn.active,
.accessibility-menu-content .contrast-btn.active,
.accessibility-menu-content .letter-spacing-btn.active,
.accessibility-menu-content .line-height-btn.active,
.accessibility-menu-content .word-spacing-btn.active,
.accessibility-menu-content .paragraph-spacing-btn.active {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.accessibility-menu-content .font-size-btn:hover .btn-label,
.accessibility-menu-content .contrast-btn:hover .btn-label,
.accessibility-menu-content .letter-spacing-btn:hover .btn-label,
.accessibility-menu-content .line-height-btn:hover .btn-label,
.accessibility-menu-content .word-spacing-btn:hover .btn-label,
.accessibility-menu-content .paragraph-spacing-btn:hover .btn-label,
.accessibility-menu-content .font-size-btn.active .btn-label,
.accessibility-menu-content .contrast-btn.active .btn-label,
.accessibility-menu-content .letter-spacing-btn.active .btn-label,
.accessibility-menu-content .line-height-btn.active .btn-label,
.accessibility-menu-content .word-spacing-btn.active .btn-label,
.accessibility-menu-content .paragraph-spacing-btn.active .btn-label {
    color: white;
}

.accessibility-menu-content .font-size-btn:hover .btn-description,
.accessibility-menu-content .contrast-btn:hover .btn-description,
.accessibility-menu-content .letter-spacing-btn:hover .btn-description,
.accessibility-menu-content .line-height-btn:hover .btn-description,
.accessibility-menu-content .word-spacing-btn:hover .btn-description,
.accessibility-menu-content .paragraph-spacing-btn:hover .btn-description,
.accessibility-menu-content .font-size-btn.active .btn-description,
.accessibility-menu-content .contrast-btn.active .btn-description,
.accessibility-menu-content .letter-spacing-btn.active .btn-description,
.accessibility-menu-content .line-height-btn.active .btn-description,
.accessibility-menu-content .word-spacing-btn.active .btn-description,
.accessibility-menu-content .paragraph-spacing-btn.active .btn-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Nowe grupy kontrolek accessibility */
.accessibility-spacing-controls,
.accessibility-line-height-controls,
.accessibility-word-spacing-controls,
.accessibility-paragraph-spacing-controls {
    margin-bottom: 15px;
}

.accessibility-spacing-controls h4,
.accessibility-line-height-controls h4,
.accessibility-word-spacing-controls h4,
.accessibility-paragraph-spacing-controls h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

/* Responsive styles for accessibility menu */
@media (max-width: 480px) {
    .accessibility-menu-panel {
        width: 100%;
        right: -100%;
    }
    
    .font-size-buttons,
    .contrast-buttons, 
    .letter-spacing-buttons, 
    .line-height-buttons, 
    .word-spacing-buttons, 
    .paragraph-spacing-buttons {
        justify-content: center;
    }
    
    .accessibility-menu-content .font-size-btn,
    .accessibility-menu-content .contrast-btn {
        min-width: 70px;
        min-height: 70px;
        padding: 12px 15px;
        box-sizing: border-box;
        justify-content: center;
    }
    
    .accessibility-menu-content .font-size-btn .btn-label,
    .accessibility-menu-content .contrast-btn .btn-label {
        font-size: 18px;
        margin-bottom: 3px;
    }
    
    .accessibility-menu-content .font-size-btn .btn-description,
    .accessibility-menu-content .contrast-btn .btn-description {
        font-size: 11px;
    }
    

}

@media (max-width: 1199px) {

    

    
    #top {
        padding: 15px 0;
    }
    
    #top .row {
        align-items: center;
    }
    
    #logo img {
        max-height: 60px;
        width: auto;
    }
    
    /* Specjalne style dla headera - kolumny obok siebie */
    #top .col-3 {
        flex: 0 0 auto;
        margin-right: 15px;
    }
    
    #top .col-9 {
        flex: 1;
        min-width: 0; /* Pozwala na zmniejszanie */
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }



    .hero-content h1 {
        font-size: 40px;
        font-weight: 300;
    }

    .section-title {
        font-size: 32px;
    }

    .contact-title {
        font-size: 36px;
    }

    .col-3, .col-4, .col-6, .col-8, .col-9 {
        flex: 0 0 100%;
    }

    .about-images {
        height: 300px;
        margin-top: 40px;
    }



    .service-item.cennik-column {
        min-height: auto;
        padding-top: 30px; /* Reset padding-top na tablet */
        justify-content: center;
    }
    
    .service-item.cennik-column h3 {
        margin-top: 0; /* Reset margin-top na tablet */
    }
    
    .service-item.cennik-column h4 {
        margin-top: 0; /* Reset margin-top na tablet */
    }

    #footer-outer .container {
        text-align: center;
    }

    /* Responsive font sizes */
    .hero-content h1 {
        font-size: calc(var(--font-size-base) * 2.2) !important;
        font-weight: 300 !important;
    }

    .section-title {
        font-size: calc(var(--font-size-base) * 1.8) !important;
    }

    .contact-title {
        font-size: calc(var(--font-size-base) * 1.9) !important;
    }

    /* Image modal responsive */
    .image-modal-nav {
        font-size: 20px;
        padding: 10px 15px;
        width: 50px;
        height: 50px;
    }
    
    .image-modal-nav::before {
        width: 20px;
        height: 20px;
    }

    .image-modal-prev {
        left: 10px;
    }

    .image-modal-next {
        right: 10px;
    }

    .image-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .image-modal-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Hide WCAG controls on small screens and show in mobile menu */
@media (max-width: 600px) {
    .accessibility-controls {
        display: none !important;
    }
    
    .mobile-accessibility-controls {
        display: block;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    #top {
        padding: 10px 0;
    }
    
    #logo img {
        max-height: 50px;
    }
    
    .mobile-menu-toggle {
        font-size: 20px;
        padding: 6px 10px;
        min-width: 40px;
        min-height: 32px;
    }
    
    .accessibility-menu-toggle {
        font-size: 18px;
        padding: 1px 5px;
        min-width: 40px;
        min-height: 32px;
        margin-right: 6px;
    }
     .accessibility-menu-toggle img{
        width: 28px;
        height: 28px;
     }   
    /* Jeszcze bardziej kompaktowe kontrolki na bardzo małych ekranach */
    .accessibility-controls {
        gap: 5px;
    }
    
    .font-size-controls,
    .contrast-controls {
        gap: 1px;
    }
    
    .font-size-btn,
    .contrast-btn {
        padding: 2px 4px;
        font-size: 10px;
        min-width: 20px;
        height: 20px;
    }
    
    .font-size-controls span,
    .contrast-controls span {
        font-size: 10px;
        margin-right: 1px;
    }
    
    /* Specjalne style dla headera na bardzo małych ekranach */
    #top .col-3 {
        margin-right: 10px;
    }

    .hero-section {
        height: 400px;
    }

    .services-section,
    .gallery-section {
        padding: 40px 0;
    }

    .service-item {
        padding: 20px 10px;
        min-height: auto;
    }

    .service-item.cennik-column {
        min-height: auto;
        padding-top: 20px; /* Reset padding-top na mobile */
        justify-content: center;
    }
    
    .service-item.cennik-column h3 {
        margin-top: 0; /* Reset margin-top na mobile */
    }
    
    .service-item.cennik-column h4 {
        margin-top: 0; /* Reset margin-top na mobile */
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementy animowane - początkowy stan tylko przy first-run */
body.first-run .service-item,
body.first-run .section-title,
body.first-run .section-subtitle,
body.first-run .gallery-title,
body.first-run .gallery-subtitle,
body.first-run .about-content,
body.first-run .about-content p,
body.first-run .about-images {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility Classes */
.text-center { text-align: center; }

/* Usuń outline po kliknięciu myszą, ale zachowaj dla klawiatury */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
    outline: none;
}

/* Zachowaj outline dla nawigacji klawiaturą */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.mt-40 { margin-top: 40px; }

/* Additional hover effects */
.service-item:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.service-item:hover .service-icon img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #3663a5;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .modal,
    .mobile-menu-toggle,
    .gallery-overlay {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        height: auto;
        padding: 40px 0;
    }
    
    .hero-section::before {
        display: none;
    }
    
    .hero-content {
        color: #333;
    }
}

/* Page Transitions Styles */
#page-transition-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: calc(100vh - 120px); /* Odejmij wysokość sticky header */
}

.page-slide {
    position: relative;
    width: 100%;
    transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.page-slide.current-page {
    transform: translateX(0);
}

.page-slide.next-page {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(100%);
    z-index: 1;
}

.page-content {
    width: 100%;
    min-height: calc(100vh - 120px);
}

/* Zapewnij, że headery pozostają na miejscu */
#header-secondary-outer,
#top {
    position: relative;
    z-index: 1000;
    background: #fff; /* Zapewnij tło, żeby nie było przezroczyste */
}

/* Wyłącz animacje dla użytkowników preferujących mniej ruchu */
@media (prefers-reduced-motion: reduce) {
    .page-slide {
        transition: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Animacje tylko przy pierwszym uruchomieniu */
body:not(.first-run) .service-item,
body:not(.first-run) .section-title,
body:not(.first-run) .section-subtitle,
body:not(.first-run) .gallery-title,
body:not(.first-run) .gallery-subtitle,
body:not(.first-run) .about-content,
body:not(.first-run) .about-content p,
body:not(.first-run) .about-images {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
}

body:not(.first-run) .cascading-image {
    opacity: 1 !important;
    transform: scale(1) !important;
    transition: none !important;
}

/* NAPRAWIENIE MENU - bez przebijania innych elementów */
.mobile-menu-overlay {
    z-index: 10001;
}

.mobile-menu-panel {
    z-index: 10002;
}

.accessibility-menu-overlay {
    z-index: 10003;
}

.accessibility-menu-panel {
    z-index: 10004;
}

/* Loading indicator for page transitions */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #5a8bc4);
    transform: translateX(-100%);
    animation: loading-bar 500ms ease-out;
    z-index: 10000;
}

@keyframes loading-bar {
    0% { 
        transform: translateX(-100%); 
    }
    50% { 
        transform: translateX(-20%); 
    }
    100% { 
        transform: translateX(0); 
        opacity: 0;
    }
}

/* Preload indicator */
.page-preloading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2);
    }
}

/* High contrast support for transitions */
html.high-contrast .page-loading {
    background: linear-gradient(90deg, #ffff00, #ffff00) !important;
}

html.high-contrast .page-preloading::after {
    background: #ffff00 !important;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .page-slide {
        transition: none;
    }
    
    .page-loading {
        animation: none;
        opacity: 0;
    }
    
    .page-preloading::after {
        animation: none;
    }
}