:root {
    --primary-blue: #1c3580; 
    --primary-blue-hover: #122358;
    --accent-blue: #5b7bb2;
    --light-blue: #e3f2fd; 
    --text-dark: #333333;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Zoptymalizowana zmienna dla płynnych przejść */
    --transition-smooth: 
        color .3s ease, 
        background-color .3s ease, 
        transform .3s ease, 
        box-shadow .3s ease;
}

/* Globalny box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- DOSTĘPNOŚĆ & PŁYNNE PRZEWIJANIE --- */
html {
    scroll-behavior: smooth;
}

/* Margines uwzględniający wysokość sticky headera */
section[id] {
    scroll-margin-top: 140px;
}

/* Wsparcie dla użytkowników preferujących zredukowane animacje */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; 
}

/* FOCUS */
a:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

/* --- OGÓLNE KLASY POMOCNICZE --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAGŁÓWEK (Podstawowy) --- */
.main-header {
    background-color: var(--light-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    transition: padding 0.4s ease;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

.logo-img {
    height: 95px; 
    width: auto;
    transition: height 0.4s ease;
}

.header-text {
    text-align: center;
    color: var(--primary-blue);
    flex: 1; 
    min-width: 0; 
    max-width: 700px;
    padding: 0 20px;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap; 
    transition: max-width 0.4s ease, opacity 0.25s ease, padding 0.4s ease, margin 0.4s ease, line-height 0.4s ease;
}

.header-text h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: margin 0.4s ease;
}

.header-text p {
    margin: 5px 0 0 0;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-style: italic;
    transition: margin 0.4s ease;
}

/* --- NAWIGACJA --- */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

/* Stabilne, płynne ukrywanie ikon tekstem na starcie */
.nav-icon {
    display: inline-flex;
    width: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 1.3rem;
    transform: scale(0.7);
    transition: max-width 0.3s ease, opacity 0.2s ease, transform 0.3s ease;
}

.nav-text {
    display: inline-block;
    max-width: 160px;
    opacity: 1;
    overflow: hidden;
    transition: max-width 0.3s ease, opacity 0.2s ease, transform 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width .3s ease; 
}

.main-nav a:hover::after {
    width: 100%;
}
.main-nav a:hover {
    color: var(--primary-blue-hover);
}

/* --- NAGŁÓWEK PO PRZEWINIĘCIU W DÓŁ (.scrolled) --- */
.main-header.scrolled {
    background-color: rgba(227, 242, 253, 0.95);
    backdrop-filter: blur(10px);
}

.main-header.scrolled .header-container {
    padding: 5px 20px; 
}

.main-header.scrolled .logo-img {
    height: 60px; 
}

.main-header.scrolled .main-nav a {
    padding-bottom: 0; 
}

.main-header.scrolled .header-text {
    max-width: 0;
    opacity: 0;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
    line-height: 0; /* Zeruje wysokość linii ukrytego tekstu */
}

.main-header.scrolled .header-text h1,
.main-header.scrolled .header-text p {
    margin: 0; /* Zapobiega rozpychaniu przez domyślne marginesy */
}

/* Wymuszenie wyświetlania ikon i chowania tekstu na scrollu */
.main-header.scrolled .nav-icon {
    max-width: 30px;
    width: auto;
    opacity: 1;
    transform: scale(1);
}

.main-header.scrolled .nav-text {
    max-width: 0;
    opacity: 0;
    transform: translateX(-5px);
}

.main-header.scrolled .main-nav a::after {
    display: none;
}
.main-header.scrolled .main-nav a:hover .nav-icon {
    transform: translateY(-2px);
}

/* --- MOBILNE MENU --- */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-blue);
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- GLOBALNE ODSTĘPY SEKCJI --- */
.section-padding {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 2.2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px;
}

/* --- BANER HERO --- */
.hero-section {
    position: relative;
    background-image: url('/img/hero-bg.png'); 
    background-size: cover;
    background-position: center bottom; 
    background-repeat: no-repeat;
    height: 450px; 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; 
    padding: 0 20px;
}

.hero-content h2 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 3.5rem;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5); 
}

.hero-content p {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-style: italic;
    margin: 0 0 30px 0;
}

/* --- KARTY ZABIEGÓW --- */
.treatment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.treatment-item {
    background-color: var(--light-blue);
    padding: 40px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    text-align: center;
    transition: 
        transform .3s ease,
        box-shadow .3s ease;
}

.treatment-item h3 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin: 0 0 15px 0;
    font-size: 1.4rem;
}

.treatment-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    display: block;
}

/* --- CENNIK --- */
.pricing-categories h3 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin: 40px 0 20px 0;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 5px;
}

.price-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.price-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-item-name {
    font-weight: 500;
}

.price-item-dots {
    flex-grow: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 15px;
    position: relative;
    top: -4px;
}

.price-item-value {
    font-weight: 600;
    color: var(--primary-blue);
}

/* --- PRZYCISKI --- */
.btn {
    display: inline-block;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(28, 53, 128, 0.15);
    transition: var(--transition-smooth);
}

.btn:active {
    transform: translateY(0);
}

/* Hover dla myszek */
@media (hover: hover) and (pointer: fine) {
    .treatment-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    }

    .btn:hover {
        background-color: var(--primary-blue-hover);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(28, 53, 128, 0.25);
    }
}

/* --- SEKCJA KONTAKTU I MAPY --- */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 40px; 
    flex-wrap: wrap; 
    text-align: center;
    width: 100%;
}

.contact-info p {
    margin: 0;
    font-size: 1.1rem;
}

/* --- MAPA --- */
.map {
    width: 100%;
    max-width: 1050px; 
    margin: 0 auto;
}

.map iframe {
    width: 100%;
    height: clamp(300px, 45vw, 400px); 
    display: block; 
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* --- STOPKA --- */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 0.9rem;
}

/* --- RESPONSYWNOŚĆ (MEDIA QUERIES) --- */
@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 25px;
        right: 20px;
    }
    
    .header-text h1 { font-size: 1.6rem; }
    .header-text p { display: none; } 

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-blue);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: none; 
    }

    .main-nav.active {
        display: block; 
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .main-nav a {
        padding: 15px 40px; 
        border-bottom: 1px solid rgba(28, 53, 128, 0.1);
        justify-content: flex-start; 
        gap: 15px; 
    }
    
    .nav-icon { 
        display: inline-flex; 
        max-width: none; 
        opacity: 1;
        transform: none;
    }
    .main-header.scrolled .nav-text { 
        display: inline-block; 
        max-width: none; 
        opacity: 1;
        transform: none;
    }

    .hero-section {
        height: 350px; 
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 15px;
    }
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 320px;
    background-color: var(--white);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    
    transform: translateY(150%);
    visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.cookie-banner.show {
    transform: translateY(0);
    visibility: visible;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-dark);
}

.cookie-banner a {
    color: var(--primary-blue);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cookie-banner a:hover {
    color: var(--accent-blue);
}

.cookie-banner .btn-small {
    align-self: flex-start;
    padding: 8px 20px;
    font-size: 0.85rem;
}

@media (max-width: 600px) {
    .cookie-banner {
        bottom: 0;
        left: 0;
        max-width: 100%;
        border-radius: 8px 8px 0 0;
        border-left: none;
        border-top: 4px solid var(--accent-blue);
    }
}

.treatment-accordion {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}

.treatment-accordion:last-of-type {
    border-bottom: none; 
}

.treatment-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none; 
    padding: 10px 0;
    user-select: none;
}

.treatment-summary::-webkit-details-marker {
    display: none; 
}

.accordion-icon {
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.treatment-accordion[open] .accordion-icon {
    transform: rotate(180deg);
}

.treatment-content {
    padding: 15px 0 25px 0;
    animation: slideDown 0.35s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}