/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    background-image: url('/assets/images/navbar.png');
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease;
    font-size: 1.1rem;
    position: fixed;
    top: 0;
    left: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.nav-logo h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-link {
    text-decoration: none;
    color: #124497;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    padding: 0 15px;
    height: 90px;
    display: flex;
    align-items: center;
}

.nav-link.active {
    background: #124497;
    color: #ffffff;
    font-weight: 700;
}

.nav-link span {
    position: relative;
    border-bottom: 2px solid transparent;
}

.nav-link span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #124497;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link.active span::after {
    width: 100%;
    background: #ffffff;
    transition: none;
}

.nav-link:hover span::after {
    width: 100%;
    background: #124497;
}

.nav-link.active:hover span::after {
    width: 100%;
    background: #ffffff;
    transition: none;
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-7px, -7px);
}
html {
    scroll-behavior: smooth;
    height: 100%;
}
/* Body adjustments for full-width sections */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0bb1b1 0%, #ffffff 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100%;;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Start anchor */
#start {
    position: absolute;
    top: 70px;
}

/* Category Header */
.category-header {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.category-header h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

.grid-item {
    background: white;
    border: 1px solid #72a7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grid-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.grid-item:nth-child(n+5) {
    border-bottom: none;
}

/* Dla strony głównej z 4 kolumnami - usuń dolny border od 5 elementu */
.grid-container.home-page .grid-item:nth-child(n+6) {
    border-bottom: none;
}

/* Przywróć dolny border dla 4 elementu na stronie głównej */
.grid-container.home-page .grid-item:nth-child(5) {
    border-bottom: 1px solid #72a7f7;
}

.grid-item.empty-item {
    background: white;
    cursor: default;
}

.category-content {
    width: calc(100% - 10px);
    padding: 20px 5px 20px 5px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-icon {
    width: 3rem;
    height: 3rem;
    color: #667eea;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}


.category-content a{
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.category-content > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.category-title {
    font-size: 1.3rem;
    color: #124497;
    margin-bottom: 8px;
    font-weight: 700;
    text-decoration: none;
}

.category-count {
    color: #666;
    font-size: 0.9rem;
}

/* Product view styles - TYLKO DESKTOP */
@media (min-width: 769px) {
    .grid-container.product-view {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
}

.grid-item.selected-category {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.grid-item.selected-category .category-icon {
    color: white;
}

.grid-item.selected-category .category-title,
.grid-item.selected-category .category-count {
    color: white;
}

/* Style dla głównego boksu kategorii (bez linku) */
.grid-item.category-mainbox {
    cursor: default;
}

.grid-item.product-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.grid-item.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    transition: opacity 0.3s ease;
}

.grid-item.product-item:hover::before {
    opacity: 0.8;
}

.product-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0px 20px 20px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animation classes */
.grid-item.animate-out {
    animation: slideOut 0.5s ease-in-out forwards;
}

.grid-item.animate-in {
    animation: slideIn 0.5s ease-in-out forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Sekcje strony głównej */
.offer-section, .contact-section {
    width: 100%;
    margin-bottom: 0;
    padding: 110px 0 40px 0;
}

/* Sekcja Realizacje */
.realizations-section {
    width: 100%;
    margin-bottom: 0;
    padding: 110px 0 0px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.section-header h2 {
    color: #124497;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-header p {
    color: #124497;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Sekcja Oferta */
.offer-section h2, .offer-section p{
   color: #123a75;
}
.product-content p{
   color: #333;
}
/* Animacje SVG w sekcji oferta */
.category-svg {
    height: 150px;
    width: auto;
    max-width: 100%;
    transition: all 0.4s ease;
    display: block;
    margin: 0 auto 15px auto;
}

.subpage-offer-section .category-content>div .category-svg {
    height: auto;
    width: 150px;
    max-width: 100%;
    transition: all 0.4s ease;
    display: block;
    margin: 0 auto 15px auto;
}

/* Animacje hover TYLKO na stronie głównej */
.grid-container.home-page .grid-item:not(.category-mainbox):hover .category-svg {
    transform: scale(1.15) rotate(5deg) !important;
}

/* Wyłącz animacje hover dla zdjęć produktów */
.product-image-box .grid-item:hover .category-svg {
    transform: none !important;
}

/* Wyłącz wszystkie animacje hover dla boxów na stronach produktów */
.product-layout .grid-item:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Pozostaw tylko podstawowy cień */
}



/* Sekcja Realizacje - Galeria */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}


.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img:not(.gallery-zoom) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img:not(.gallery-zoom) {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-zoom {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

/* Modal dla powiększonych zdjęć */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
    pointer-events: none;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

/* Blokada interakcji gdy modal jest otwarty */
body.modal-open {
    overflow: hidden;
}

body.modal-open * {
    pointer-events: none;
}

body.modal-open .modal,
body.modal-open .modal * {
    pointer-events: all;
}



.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    color: #ccc;
}

/* Nawigacja w modalu */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav.prev {
    left: 30px;
}

.modal-nav.next {
    right: 30px;
}

/* Przyciski nawigacji są zawsze aktywne w karuzeli w pętli */

.modal-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 10001;
}

.modal-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        transform: translate(-50%, -50%) scale(0.8); 
        opacity: 0;
    }
    to { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1;
    }
}

/* Sekcja Kontakt */
.contact-section {
    color: #123a75;
    padding: 200px 0 160px 0;
    margin-top: 0;
    position: relative;
}
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-content {
    display: grid;
    grid-template-columns: 15% 40% 40%;
    gap: 60px;
    align-items: center;
}


.contact-slogan h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.contact-slogan p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.contact-info {
    text-align: center;
}

.company-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #123a75;
}

.address p {
    font-size: 1.1rem;
    margin-bottom: 5px;
    opacity: 0.9;
    color: #123a75;
}

.contact-actions {
    margin-top: 30px;
}

.contact-scripts {
    font-size: 1.1rem;
    color: #123a75;
    font-weight: 500;
    margin-top: 15px;
}

.contact-scripts a {
    color: #123a75;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.contact-scripts a:hover {
    color: #0d2d5a;
    border-bottom-color: #0d2d5a;
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 150ms ease-in-out;
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 48px; /* Accessibility: minimum touch target */
}

.btn-primary {
    background: #123a75;
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #123a75;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    outline: 2px solid #123a75;
    outline-offset: 2px;
}

/* Stopka */
.footer {
    margin-top: 10px;
    color: rgb(0, 0, 0);
    padding: 10px 20px;
    text-align: center;
    
}
.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Back arrow */
.back-arrow {
    position: absolute;
    top: calc(50% - 20px);
    width: 40px;
    height: 40px;
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    background: #124497 url('/assets/images/arrow-left.svg') no-repeat center;
    background-size: 15px 9.371px;
    z-index: 1000;
}

.show-back-arrow .back-arrow {
    display: flex;
}

.show-back-arrow .grid-item:first-child {
    position: relative;
    overflow: visible !important; /* Pokaż strzałkę poza boxem */
}

/* Back arrow dla product-layout */
.show-back-arrow.product-layout {
    position: relative;
}

.show-back-arrow.product-layout .back-arrow {
    display: flex;
}

/* Responsive design */

/* Specjalny układ dla strony kategorii - TYLKO DESKTOP */

@media (min-width: 769px) {
    .grid-container.category-page {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
        max-width: 1200px;
        margin: 0 auto;
        /* border: 1px solid #808080; - przeniesione na boxy */
    }

    .grid-container.category-page .grid-item:nth-child(1) {
        /* Kategoria - pozycja 1, bez animacji hover */
        grid-column: 1;
        grid-row: 1;
    }

    .grid-container.category-page .grid-item:nth-child(1):hover {
        /* Wyłącz animację hover dla kategorii */
        transform: none;
        box-shadow: none;
    }

    /* Wyłącz animacje hover dla wszystkich produktów na stronach kategorii */
    .grid-container.category-page .grid-item:hover .category-svg {
        transform: none !important;
    }
    
    .grid-container.category-page .grid-item:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Pozostaw tylko podstawowy cień */
    }

    .grid-container.category-page .grid-item:nth-child(2) {
        /* Pierwszy produkt - pozycja 2 */
        grid-column: 2;
        grid-row: 1;
    }

    .grid-container.category-page .grid-item:nth-child(3) {
        /* Drugi produkt - pozycja 3 */
        grid-column: 3;
        grid-row: 1;
    }

    .grid-container.category-page .grid-item:nth-child(4) {
        /* Trzeci produkt - pozycja 4 */
        grid-column: 4;
        grid-row: 1;
    }

    /* Pustka pod kategorią - rząd 2, kolumna 1 pozostaje pusta */

    .grid-container.category-page .grid-item:nth-child(5) { grid-column: 2; grid-row: 2; }
    .grid-container.category-page .grid-item:nth-child(6) { grid-column: 3; grid-row: 2; }
    .grid-container.category-page .grid-item:nth-child(7) { grid-column: 4; grid-row: 2; }
    .grid-container.category-page .grid-item:nth-child(8) { grid-column: 2; grid-row: 3; }
    .grid-container.category-page .grid-item:nth-child(9) { grid-column: 3; grid-row: 3; }
    .grid-container.category-page .grid-item:nth-child(10) { grid-column: 4; grid-row: 3; }
    .grid-container.category-page .grid-item:nth-child(11) { grid-column: 2; grid-row: 4; }
    .grid-container.category-page .grid-item:nth-child(12) { grid-column: 3; grid-row: 4; }
    .grid-container.category-page .grid-item:nth-child(13) { grid-column: 4; grid-row: 4; }
    .grid-container.category-page .grid-item:nth-child(14) { grid-column: 2; grid-row: 5; }   
    .grid-container.category-page .grid-item:nth-child(15) { grid-column: 3; grid-row: 5; }  
    .grid-container.category-page .grid-item:nth-child(16) { grid-column: 4; grid-row: 5; }       

    /* Border dla wszystkich boxów w układzie kategorii */
    .grid-container.category-page .grid-item {
        border: 1px solid #72a7f7;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(10px);
        padding: 20px 0;
        gap: 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 15px 20px;
        display: block;
        border-radius: 8px;
        margin: 0 20px;
        transition: all 0.3s ease;
        height: auto;
    }
    
    .nav-link:hover {
        background: rgba(18, 68, 151, 0.1);
    }
    
    .nav-link span::after {
        display: none;
    }
    
    .nav-link.active {
        background: #124497;
        color: #ffffff;
    }
    
    .grid-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    
    .grid-item:nth-child(3n) {
        border-right: 1px solid #808080;
    }
    
    .grid-item:nth-child(2n) {
        border-right: none;
    }
    
    .grid-item:nth-child(n+5) {
        border-bottom: none;
    }
    
    .category-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    /* Responsywne style dla nowych sekcji */
    .offer-section, .realizations-section, .contact-section {
        padding: 120px 15px 20px 15px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .contact-slogan h2 {
        font-size: 1.8rem;
    }
    
    .contact-slogan p {
        font-size: 1rem;
    }
    
    .company-info h3 {
        font-size: 1.5rem;
    }
    
    .phone-button {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
    
    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal-counter {
        top: 15px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
    
    .modal-nav {
        font-size: 20px;
        padding: 12px 15px;
    }
    
    .modal-nav.prev {
        left: 15px;
    }
    
    .modal-nav.next {
        right: 15px;
    }
    
    .modal-content {
        max-width: 98vw;
        max-height: calc(100vh - 70px);
    }
    
    .modal-caption {
        bottom: 15px;
        font-size: 1rem;
        padding: 8px 15px;
    }
    .back-arrow{
        left: 30px;
    }
}

/* Tablet layout dla kontaktu - 769px do 1000px */
@media (min-width: 769px) and (max-width: 1100px) {
    .offer-section, .realizations-section, .contact-section {
        padding: 120px 15px 20px 15px;
    }
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(1, 1fr);
        gap: 0;
        max-width: 1080px;
        margin: 0 auto;
    }
    .grid-container.home-page {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1080px;
    }

    .contact-content {
        display: grid;
        grid-template-columns: calc(20% - 8px) calc(80% - 32px);
        grid-template-rows: auto auto;
        gap: 40px;
        align-items: start;
    }
    
    .contact-content > :nth-child(3) {
        /* Trzeci element w drugim rzędzie, wyśrodkowany */
        grid-column: 1 / -1;
        justify-self: center;
        max-width: 400px;
        text-align: center;
    }
    
    /* Dostosowanie rozmiaru obrazka tomografu */
    .contact-img {
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
    
    .contact-img img {
        width: 120px !important;
        height: auto !important;
    }
    
    /* Dostosowanie sloganu */
    .contact-slogan {
        padding-left: 0;
    }
    
    .contact-slogan h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .contact-slogan p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* Dostosowanie info */
    .contact-info {
        padding: 15px;
        margin-top: 20px;
    }
    .back-arrow {
        left: 30px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
    
    .grid-item:nth-child(2n) {
        border-right: 1px solid #808080;
    }
    
    .grid-item:nth-child(n) {
        border-right: none;
    }
    
    .grid-item:nth-child(n+6) {
        border-bottom: none;
    }
    
    .category-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .category-title {
        font-size: 1rem;
    }
    
    /* Style dla bardzo małych ekranów */
    .offer-section, .realizations-section, .contact-section {
        padding: 120px 15px 40px 15px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-item {
        min-height: auto;
    }
    
    .gallery-item img:not(.gallery-zoom) {
        height: 200px;
    }
    
    .gallery-caption {
        padding: 15px;
    }
    
    .gallery-caption h4 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .gallery-caption p {
        font-size: 0.9rem;
    }
 
    .contact-content {
        gap: 30px;
    }
    
    .contact-slogan h2 {
        font-size: 1.5rem;
    }
    
    .phone-button {
        font-size: 1rem;
        padding: 10px 20px;
        gap: 10px;
    }
    
    .modal-close {
        font-size: 25px;
        top: 10px;
        right: 15px;
    }
    
    .modal-counter {
        top: 10px;
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .modal-nav {
        font-size: 18px;
        padding: 10px 12px;
    }
    
    .modal-nav.prev {
        left: 10px;
    }
    
    .modal-nav.next {
        right: 10px;
    }
    
    .modal-content {
        max-width: 100vw;
        max-height: calc(100vh - 60px);
    }
    .back-arrow{
        left: 30px;
    }
}

@media (min-width: 1100px) {
    .grid-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(1, 1fr);
        gap: 0;
        max-width: 1200px;
        margin: 0 auto;
        /* border: 1px solid #808080; - przeniesione na boxy */
    }
    /* Specjalna reguła dla strony głównej - 4 kolumny */
    .grid-container.home-page {
        grid-template-columns: repeat(5, 1fr);
    }
    .back-arrow {
        left: -45px;
    }
}
@media (min-width: 1400px) {
    .modal-content {
        max-width: 90vw;
        max-height: calc(100vh - 100px);
    }
}

/* Product Layout Styles - B TTTTT */
.product-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 200px); /* Wypełnij większość strony */
}

.product-box {
    position: relative; /* Potrzebne dla pseudoelementów */
    height: fit-content;
    align-self: start; /* Wyrównaj do góry z treścią opisową */
}

.product-image-box {
    position: relative; /* Potrzebne dla pseudoelementów */
    height: fit-content;
    align-self: start; /* Wyrównaj do góry z treścią opisową */
}

/* Efekt hover dla zdjęcia produktu - podobny do galerii realizacji */
.product-image-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image-box:hover::after {
    opacity: 1;
}

.product-image-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    background: url('/assets/images/zoom.svg') no-repeat center;
    background-size: contain;
    filter: brightness(0) invert(1); /* Zmień na biały */
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-image-box:hover::before {
    opacity: 1;
}

.product-main-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Usunięto animację hover - zastąpiona funkcjonalnością powiększania */

.product-content-area {
    background: #fff;
    padding: 30px;
    border: 1px solid #72a7f7;
    height: fit-content;
    min-height: 400px; /* Minimum wysokość */
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #124497;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 8px;
    color: #999;
}

.product-price {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #124497;
}

.product-price strong {
    color: #124497;
    font-size: 1.2em;
}

.product-description h1 {
    color: #124497;
    font-size: 2rem;
    margin: 20px 0;
    font-weight: 700;
}

.product-content {
    line-height: 1.8;
    margin: 30px 0;
    font-size: 16px;
    color: #333;
    text-align: justify;
}

.contact-info {
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.contact-info h3 {
    color: #124497;
    margin-bottom: 15px;
}

/* Modal dla powiększonych zdjęć - duplikat usunięty */

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #bbb;
}


/* Linki w boxach kategorii */
.category-content a{
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.category-content a:hover {
    text-decoration: none;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.category-item:hover .category-title {
    color: #124497;
}

.category-mainbox{
    background-color: #124497;
}
.category-mainbox h3, .category-mainbox p, .category-mainbox:hover .category-title{
    color: #ffffff;
}

/* Responsive dla układu produktu */
@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .product-content-area {
        padding: 15px;
    }
}

/* Dodatkowe style dla galerii realizacji */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
}

.gallery-item img:not(.gallery-zoom) {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img:not(.gallery-zoom) {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 68, 151, 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-caption {
    padding: 20px;
    text-align: left;
}

.gallery-caption h4 {
    color: #124497;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.gallery-caption p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
}

/* Modal dla galerii - duplikat usunięty */

.modal-content {
    display: block;
    margin: auto;
    max-width: 95vw;
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation-fill-mode: forwards;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.modal-close:hover {
    color: #ccc;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    z-index: 10000;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.4);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

/* Info Grid Section - nowy design bez tła i border */
.info-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(1, 1fr);
    gap: 0;
    max-width: 1200px;
    margin: 0px auto 60px auto;
    padding: 20px 20px 20px 20px;
    position: relative;
}

/* Mobile - 2 kolumny */
@media (max-width: 768px) {
    .info-grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0;
        margin: 40px auto 30px auto;
        padding: 20px 15px;
    }
}

/* Desktop - 4 kolumny bez gap */
@media (min-width: 769px) {
    .info-grid-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
        padding: 20px 0;
    }
}

/* Nowe style dla info grid items - bez tła i border */
.info-grid-item {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

/* Separatory między boksami - tylko na desktop */
@media (min-width: 769px) {
    .info-grid-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 60%;
        background: #124497;
    }
}

/* Na mobile separatory poziome */
@media (max-width: 768px) {
    .info-grid-item:nth-child(1)::after,
    .info-grid-item:nth-child(2)::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
        height: 1px;
        background: #ddd;
    }
    
    .info-grid-item:nth-child(odd):not(:nth-child(3))::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 60%;
        background: #ddd;
    }
}

.info-content {
    text-align: center;
    padding: 0;
}

.info-svg {
    width: 60px;
    height: 60px;
    color: #124497;
    margin-bottom: 15px;
}

.info-title {
    font-size: 1.2rem;
    color: #124497;
    margin-bottom: 12px;
    font-weight: 700;
}

.info-description {
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Style dla info items - zachowaj kompatybilność */
.info-item {
    cursor: default;
}

.contact-section, .subpage-offer-section, .info-grid-container{
    margin-bottom: 200px;
}

/* Product Attachments Styles */
.product-attachments-box {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.attachments-title {
    color: #124497;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #124497;
}

.attachments-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attachment-item {
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    overflow: hidden;
}

.attachment-item:hover {
    border-color: #124497;
    box-shadow: 0 2px 8px rgba(18, 68, 151, 0.1);
    transform: translateY(-1px);
}

.attachment-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.attachment-link:hover {
    color: #124497;
    background: #f8f9fa;
}

.attachment-icon {
    flex-shrink: 0;
    margin-right: 12px;
}

.pdf-icon {
    width: 24px;
    height: 24px;
    color: #dc3545;
}

.attachment-content {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 2px;
    word-break: break-word;
}

.attachment-type {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.attachment-download {
    flex-shrink: 0;
    margin-left: 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.attachment-link:hover .attachment-download {
    opacity: 1;
}

.download-icon {
    width: 18px;
    height: 18px;
    color: #124497;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .product-attachments-box {
        margin-top: 15px;
        padding: 15px;
        border-radius: 6px;
    }
    
    .attachments-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .attachments-grid {
        gap: 8px;
    }
    
    .attachment-link {
        padding: 10px 12px;
    }
    
    .attachment-icon {
        margin-right: 10px;
    }
    
    .pdf-icon {
        width: 20px;
        height: 20px;
    }
    
    .attachment-name {
        font-size: 0.85rem;
    }
    
    .attachment-type {
        font-size: 0.7rem;
    }
    
    .download-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .product-attachments-box {
        padding: 12px;
        margin-top: 12px;
    }
    
    .attachments-title {
        font-size: 0.95rem;
        margin-bottom: 10px;
    }
    
    .attachment-link {
        padding: 8px 10px;
    }
    
    .attachment-icon {
        margin-right: 8px;
    }
    
    .pdf-icon {
        width: 18px;
        height: 18px;
    }
    
    .attachment-name {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .attachment-type {
        font-size: 0.65rem;
    }
    
    .attachment-download {
        margin-left: 8px;
    }
    
    .download-icon {
        width: 14px;
        height: 14px;
    }
}
