/* Styles dla konfiguratora produktu - Timeline z akordeonem */

/* Zmienne CSS */
:root {
    --primary-color: #0160a3;
    --secondary-color: rgb(36, 150, 243);
    --accent-color: #ffde21;
    --dark-color: #0160a3;
    --light-color: #f9ffff;
    --gray-color: #eceff1;
    --transition: transform 0.3s ease, box-shadow 0.3s ease;
    --shadow: 0 2px 2px rgba(0, 0, 0, 0.08);
    --border-radius: 5px;
}

/* Mini boksy nawigacyjne dla kategorii - w jednej linii */
.configurator-nav {
    max-width: calc(1200px - 20px);
    padding: 0px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
}

.category-nav-box {
    display: flex;
    background-color: #ffffff;
    padding: 0px 8px 0px 8px;
    margin-right:5px;
    margin-left: 5px;   
    text-align: left;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out;
}

.category-nav-box:hover {
    border-left-color: var(--primary-color);
    transform: translateY(-3px);
}

.category-nav-box.active {
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    background-color: #f0f8ff;
}

.category-nav-box .box-num{
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0160a34b;
    width: 40px;
    text-align: right;
    font-size: 35px;
    padding: 0px;
    margin-right: 5px;
    animation: fadeInUp 1.3s ease-out;
}
.category-nav-box.active .box-num{
    border-right: 1px solid #0160a34b;
}
.category-nav-box.active .box-title{
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.category-nav-box .box-title{
    display: none;
    text-decoration: none;
}
.category-nav-box:hover .box-num,
.category-nav-box.active .box-num {
    color: var(--primary-color);
}

.category-nav-icon {
    font-size: 1.1rem;
}

/* Sekcje konfiguratora - ukryte domyślnie */
.configurator-section {
    display: none;
}

.configurator-section.active {
    display: block;
}

/* Timeline dla sekcji cennikowych */
.section-header {
    text-align: center;
    position: relative;
}

/* Style nagłówków h2 - zgodne z .section-header h2 ze strony głównej */
h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}


.section-header h2 {
    color: #1a202c;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

/* Akordeon dla cennika */
.pricing-accordion {
    margin-top: 40px;
}

.accordion-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 8px 25px rgba(1, 96, 163, 0.12);
}

.accordion-header {
    background: linear-gradient(135deg, #0160a3, #2493f3);
    color: white;
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.accordion-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.accordion-header:hover::before {
    left: 100%;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.2rem;
    font-weight: 400;
}

.accordion-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.accordion-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-content {
    overflow: hidden;
    background: #f8fafc;
    display: none;
    padding: 30px;
}

.accordion-item.active .accordion-content {
    display: block;
}

/* Wrapper dla tabeli zapewniający stałą szerokość */
.table-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.section-standard-equipment{
    position: relative;
    padding: 20px 0px 90px 0px;
}
.section-standard-equipment::before{
    position: absolute;
    top: -130px;
    left: 0px;
    height: calc(100% + 130px);
    max-height: calc(100% + 130px);
    width: 100%;
    content: "";
    background-image: url('/assets/images/fala.svg?a=1a');
    background-position: top left;
    background-repeat: none;
    z-index: 10;
}
.standard-equipment-container{
    position: relative;
    max-width: 1100px;
    margin: 0px auto 10px auto;
    z-index: 11;
}
.standard-equipment-header h2{
    font-size: 2.5rem;
    display: block;
    width: 100%;
    margin: 10px auto 20px auto;
    color: #ffffff;
    text-align: center;
    text-shadow: rgba(0, 0, 0, 0.1) 0px 2px 8px;
    position: relative;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 12;
}

.standard-equipment{
    max-width: calc(1200px - 20px);
    padding: 0px 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}
.standard-equipment>div{
    position: relative;
    color: #ffffff;
    border-radius: 0px;
    border-left: 1px solid #ffffff4b;
    padding: 0px 30px 10px 10px;
    text-align: left;
    /* Animacja zostanie dodana przez system przewijania */
}
.standard-equipment>div span{
    color: #ffffff4b;
    display: block;
    position: absolute;
    top: -10px;
    left: -30px;
    width: 30px;
    text-align: center;
    font-size: 35px;
    padding: 0px;
    /* Animacja zostanie dodana przez system przewijania */
}
/* Zapewniamy stałą szerokość tabeli */
.pricing-grid{
    max-width: 1100px;
    margin: 20px auto;
}
.pricing-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.pricing-table tr:hover {
    background-color: #e2e8f0;
}

.pricing-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.pricing-table td:first-child {
    font-weight: 400;
    color: #1a202c;
    width: 70%;
}

/* Responsywność dla sekcji standard-equipment i configurator-nav */
@media (max-width: 1024px) {
    .standard-equipment {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
        margin: 0 10px;
    }
    
    .configurator-nav {
        gap: 15px;
        margin: 20px 10px;
        padding: 0px 10px;
        flex-wrap: wrap;
    }
    
    .standard-equipment-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2.2rem;
    }
    
    .section-standard-equipment {
        padding: 45px 0px 60px 0px;
    }
    
    .section-standard-equipment::before {
        top: -100px;
        height: calc(100% + 100px);
        max-height: calc(100% + 100px);
    }
    
    .standard-equipment-container {
        max-width: 100%;
        margin: 10px 20px;
    }
    
    .standard-equipment-header h2 {
        font-size: 1.8rem;
        margin: 5px auto 20px;
    }
    
    .standard-equipment {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }
    
    .standard-equipment > div {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
    
    .configurator-nav {
        gap: 10px;
        margin: 15px 10px;
        padding: 0px 5px;
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .category-nav-box {
        padding: 15px 5px;
        font-size: 0.9rem;
        flex: 0 0 auto;
        min-width: min-content;
        max-width: 200px;
    }
    
    .accordion-header {
        padding: 20px;
    }
    
    .accordion-title {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Animacje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-item {
    /* Usunięto animację dla płynnych przejść */
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Wyłącz wszystkie animacje wewnątrz sekcji konfiguratora */
.configurator-section * {
    animation: none !important;
    transition: none !important;
}

/* Przywróć tylko potrzebne transition dla interakcji */
.configurator-section .nav-arrow {
    transition: all 0.3s ease !important;
}

.configurator-section .accordion-toggle {
    transition: transform 0.3s ease !important;
}

.configurator-section .custom-radio,
.configurator-section .custom-checkbox {
    transition: all 0.3s ease !important;
}

/* Style dla opcji "Brak wyboru" */
tr[data-price="0"] {
    background-color: #f8f9fa;
    color: #6c757d;
}

tr[data-price="0"]:hover {
    background-color: #e9ecef;
}

tr[data-price="0"].selected {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* Styl dla elementu "lub" między opcjami konfiguratora */
.option-separator {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 40px;
    text-align: center;
    background: white;
    padding: 2px 5px;
    font-style: italic;
    color: #666;
    font-size: 12px;
    z-index: 10;
    white-space: nowrap;
    border-radius: 14px;
    border: 1px solid #c8cbce;
}

/* Layout 2-kolumnowy dla konfiguratora */
.configurator-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}

.configurator-sections {
    flex: 0 0 70%;
    position: relative;
}

/* Strzałki nawigacyjne */
.section-navigation-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    z-index: 20;
}

.nav-arrow {
    position: absolute;
    top: 0;
    width: 40px;
    height: 40px;
    background: rgba(1, 96, 163, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(1, 96, 163, 0.3);
}

.nav-arrow:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(1, 96, 163, 0.4);
}

.nav-arrow-left {
    left: -20px;
}

.nav-arrow-right {
    right: -20px;
}

.nav-arrow svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Prawa kolumna z kalkulatorem i kontaktem */
.configurator-sidebar {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
    height: fit-content;
    margin-top: 40px;
}

/* Kalkulator konfiguracji */
.configuration-calculator {
    background: linear-gradient(135deg, #0160a3, #2493f3);
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(1, 96, 163, 0.2);
    z-index: 15;
}

.configuration-calculator h3 {
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.calculator-breakdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calculator-breakdown > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    gap: 10px;
}

.calculator-breakdown > div span:first-child {
    flex: 1;
    line-height: 1.4;
}

.calculator-breakdown > div span:last-child {
    flex-shrink: 0;
    font-weight: 600;
    white-space: nowrap;
}

.calculator-breakdown > div:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding-top: 15px;
}

/* Niestandardowe radio i checkbox */
.option-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 2px 0;
    min-height: 24px;
}

.custom-input-wrapper {
    position: relative;
    flex-shrink: 0;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option-text {
    flex: 1;
    position: relative;
    line-height: 1.5;
    display: flex;
    align-items: center;
    min-height: 24px;
}

/* Pozycjonowanie elementu "lub" względem wiersza tabeli */
.pricing-table tr {
    position: relative;
}

/* Ukryj domyślne inputy */
.custom-radio,
.custom-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Style dla radio button */
.custom-radio-label {
    cursor: pointer;
    display: inline-block;
    position: relative;
}

.radio-svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.radio-circle {
    fill: none;
    stroke: #cbd5e0;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.radio-dot {
    fill: var(--primary-color);
    transform: scale(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

/* Animacja dla zaznaczonego radio */
.custom-radio:checked + .custom-radio-label .radio-circle {
    stroke: var(--primary-color);
    stroke-width: 2;
}

.custom-radio:checked + .custom-radio-label .radio-dot {
    transform: scale(1);
}

.custom-radio:hover + .custom-radio-label .radio-circle {
    stroke: var(--secondary-color);
}

/* Style dla checkbox */
.custom-checkbox-label {
    cursor: pointer;
    display: inline-block;
    position: relative;
}

.checkbox-svg {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.checkbox-rect {
    fill: none;
    stroke: #cbd5e0;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.checkbox-check {
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 16;
    stroke-dashoffset: 16;
    transition: all 0.3s ease;
}

/* Animacja dla zaznaczonego checkbox */
.custom-checkbox:checked + .custom-checkbox-label .checkbox-rect {
    fill: var(--primary-color);
    stroke: var(--primary-color);
}

.custom-checkbox:checked + .custom-checkbox-label .checkbox-check {
    stroke-dashoffset: 0;
}

.custom-checkbox:hover + .custom-checkbox-label .checkbox-rect {
    stroke: var(--secondary-color);
}

/* Hover efekty dla wierszy tabeli z opcjami */
.pricing-table tr:hover .radio-circle,
.pricing-table tr:hover .checkbox-rect {
    stroke: var(--secondary-color);
}

/* Modyfikacja struktury tabeli dla opcji */
.option-cell {
    width: 70%;
    padding: 15px 20px;
}

.price-cell {
    width: 30%;
    padding: 15px 20px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
}

/* Klikalne wiersze tabeli */
.pricing-table tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pricing-table tr:hover {
    background-color: #f8fafc;
}

.pricing-table tr.selected {
    background-color: #e6f3ff;
}

/* Animacja pojawiania się kalkulatora */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsywność dla tabletów */
@media (max-width: 1044px) and (min-width: 769px) {
    .configurator-content {
        gap: 15px;
        padding: 0 10px;
    }
    
    .configurator-sections {
        flex: 0 0 62%;
    }
    
    .configurator-sidebar {
        flex: 0 0 38%;
        margin-top: 20px;
    }
    
    .configuration-calculator {
        padding: 20px 15px;
    }
    
    .configuration-calculator h3 {
        font-size: 1.3rem;
    }
}

/* Responsywność dla kalkulatora */
@media (max-width: 768px) {
    .configurator-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .configurator-sections {
        flex: 1;
        width: 100%;
    }
    
    .configurator-sidebar {
        flex: 1;
        position: static;
        margin-top: 0;
        width: 100%;
    }
    
    .configuration-calculator {
        padding: 20px;
    }
    
    /* Ukryj strzałki na mobilnych */
    .section-navigation-arrows {
        display: none;
    }
    
    .configuration-calculator h3 {
        font-size: 1.3rem;
    }
    
    .calculator-breakdown > div {
        font-size: 0.9rem;
    }
    
    .option-wrapper {
        gap: 8px;
    }
    
    .radio-svg,
    .checkbox-svg {
        width: 20px;
        height: 20px;
    }
}

/* Przycisk telefonu w sidebarze - style ze strony głównej */
.configurator-sidebar .btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: 1.2px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 188, 212, 0.3);
    text-decoration: none;
    width: 100%;
    text-align: center;
}

.configurator-sidebar .btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.configurator-sidebar .btn-primary {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 10px rgba(255, 82, 82, 0.3);
}

.configurator-sidebar .btn-primary:hover {
    background-color: var(--primary-color);
    box-shadow: 0 6px 15px rgba(0, 188, 212, 0.4);
}

.configurator-sidebar .btn span {
    display: block;
}