:root {
    /* LIGHT MODE (Default) */
    --bg-color: #FFFFFF;
    --surface-color: rgba(255, 255, 255, 0.6);
    --surface-border: rgba(128, 0, 32, 0.1);
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --accent-bordeaux: #4D0F0A;
    --accent-glow: rgba(128, 0, 32, 0.2);
    --content-bg: #F9F9F9;
    --content-bg-hover: #f0f0f0;
    --content-border: rgba(0, 0, 0, 0.05);
    --content-border-hover: rgba(0, 0, 0, 0.3);
    
    --bento-gap: 16px;
    --radius-large: 24px;
    --radius-small: 12px;
}

body.dark-theme {
    /* DARK MODE */
    --bg-color: #000000;
    --surface-color: rgba(15, 15, 15, 0.8);
    --surface-border: rgba(163, 0, 41, 0.3);
    --text-primary: #E0E0E0;
    --text-secondary: #999999;
    --accent-bordeaux: #5E1914; /* Głębsze bordo dla trybu Dark */
    --accent-glow: rgba(163, 0, 41, 0.5);
    --content-bg: rgba(255, 255, 255, 0.05);
    --content-bg-hover: rgba(255, 255, 255, 0.1);
    --content-border: rgba(255, 255, 255, 0.1);
    --content-border-hover: rgba(163, 0, 41, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2 {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

h3 {
    font-weight: 600;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-large);
    padding: 24px;
    transition: all 0.5s ease;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.glas.sticky-cta:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 10px 40px rgba(128, 0, 32, 0.4);
}

/* Micro-navigation */
.akademia-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.nav-pill {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: inherit;
    letter-spacing: 0.05em;
}

.nav-pill:hover {
    border-color: var(--accent-bordeaux);
}

.nav-pill.active {
    background: var(--accent-bordeaux);
    border-color: var(--accent-bordeaux);
    color: #FFFFFF;
}

/* Modal Overlay System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 20px;
}

.modal-overlay.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: var(--radius-large);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    flex-direction: column;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.95);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--accent-bordeaux);
}

.modal-body {
    padding-top: 20px;
}

.modal-body h3 {
    font-weight: 600;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    padding-right: 30px;
}

.modal-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.modal-badge {
    background: rgba(128, 0, 32, 0.1);
    color: var(--accent-bordeaux);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.dark-theme .modal-badge {
    background: rgba(163, 0, 41, 0.2);
    color: #fff;
}

.modal-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.modal-points {
    margin-bottom: 25px;
    background: rgba(0,0,0,0.02);
    padding: 15px;
    border-radius: 12px;
}
.dark-theme .modal-points {
    background: rgba(255,255,255,0.03);
}

.modal-points h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--accent-bordeaux);
    padding-bottom: 4px;
    display: table;
}

.modal-points ul {
    list-style-type: none;
    padding-left: 0;
}

.modal-points ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.modal-points ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-bordeaux);
    font-weight: bold;
}

.modal-bonus {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 20px;
}

.modal-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent-bordeaux);
    color: #FFF;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.modal-cta:hover {
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.5);
    transform: translateY(-2px);
}

/* Akademia item tweaks for modal */
.akademia-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 30px;
}
.akademia-item:hover {
    background: rgba(128, 0, 32, 0.05);
}
.akademia-item::after {
    content: '→';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--accent-bordeaux);
    opacity: 0;
    transition: opacity 0.3s ease, right 0.3s ease;
}
.akademia-item:hover::after {
    opacity: 1;
    right: 10px;
}

/* Responsive adjustments */
.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-bordeaux);
}

/* Bento Container */
.bento-container {
    display: grid;
    gap: var(--bento-gap);
    width: 100%;
    max-width: 1200px;
    /* MOBILE FIRST GRID */
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(180px, auto);
}

/* Tile Layout Adjustments */
.bento-tile {
    position: relative;
    display: flex;
    flex-direction: column;
}

.bento-hero {
    min-height: 350px;
    justify-content: flex-end;
    padding: 32px;
}

.hero-logo {
    max-width: 240px;
    height: auto;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 15px rgba(0,0,0,0.6));
    display: block;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9) !important;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: var(--radius-large);
    overflow: hidden;
}

.video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, rgba(0,0,0,0) 100%);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento-mapa {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.bento-mapa iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-large);
    opacity: 0.15;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.bento-mapa:hover iframe {
    opacity: 0.3;
}

.contact-info {
    position: relative;
    z-index: 2;
    padding: 24px;
}

/* Internal contents */
.bento-tile h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    padding-bottom: 8px;
}

/* Linii pod nagłówkami h2 w kafelkach. */
.bento-tile h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent-bordeaux);
    border-radius: 2px;
    transition: background-color 0.5s ease;
}

/* Wyjątek zlikwidowany wraz z nagłówkiem H1 */

.content-scroll {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.content-item, .price-item {
    background: var(--content-bg);
    padding: 12px 16px;
    border-radius: var(--radius-small);
    border-left: 3px solid var(--content-border);
    transition: all 0.5s ease;
}

.content-item:hover, .price-item:hover {
    border-left-color: var(--accent-bordeaux);
    background: var(--content-bg-hover);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-val {
    font-weight: 700;
    color: var(--text-primary);
}

/* Tabs */
.pricing-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.tab-btn {
    background: var(--content-bg);
    border: 1px solid var(--content-border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.5s ease;
}

.tab-btn:hover {
    background: var(--content-bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-bordeaux);
    color: #FFFFFF;
    border-color: var(--accent-bordeaux);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.tab-content.active-list {
    display: flex;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
    position: relative;
    z-index: 2;
}

.team-member {
    text-align: center;
}

.avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--accent-bordeaux);
    margin: 0 auto 4px auto;
    transition: all 0.5s ease;
}

.team-member:hover .avatar {
    border-color: var(--text-primary);
    transform: scale(1.05);
}

.team-member span {
    display: block;
}

/* --- Cennik Responsive Logic --- */
.bento-cennik {
    display: flex;
    flex-direction: column;
}
#cennik-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}
#btn-pelny-cennik {
    margin-top: auto !important;
}

@media (max-width: 1024px) {
    #cennik-uslugi .price-item:nth-child(5) { display: none !important; }
}
@media (max-width: 900px) {
    #cennik-uslugi .price-item:nth-child(4) { display: none !important; }
}
@media (max-width: 768px) {
    #cennik-uslugi .price-item:nth-child(3) { display: none !important; }
}
@media (max-width: 600px) {
    #cennik-uslugi .price-item:nth-child(2) { display: none !important; }
}
/* Nowe Klasy Zlecone (Ciasteczka + Kafelki Social) */
.hero-social-nav {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    gap: 16px;
    z-index: 10;
}
.hero-social-nav a {
    color: #000000;
    transition: transform 0.3s ease, filter 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-social-nav a:hover {
    transform: translateY(-3px) scale(1.1);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(77, 15, 10, 0.4));
}
.hero-icon {
    width: 36px;
    height: 36px;
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #4D0F0A;
    border-top: 1px solid rgba(255,255,255,0.2);
    z-index: 9999;
    padding: 20px;
    transform: translateY(0);
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cookie-consent.hidden {
    transform: translateY(110%);
    pointer-events: none;
}
.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1200px;
    width: 100%;
}
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: all 0.5s ease;
}

.theme-toggle:hover {
    box-shadow: 0 0 15px var(--accent-glow);
    border-color: var(--accent-bordeaux);
    transform: scale(1.05);
}

/* Price Details reveal */
.price-desc {
    max-height: 0;
    overflow: hidden;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
    opacity: 0;
    margin-top: 0;
    line-height: 1.4;
}

.price-item:hover .price-desc {
    max-height: 60px;
    opacity: 1;
    margin-top: 8px;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-bordeaux);
    color: #FFFFFF;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 20px var(--accent-glow);
    z-index: 100;
    transition: all 0.5s ease;
}

.sticky-cta:hover {
    background: var(--accent-bordeaux);
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 25px var(--accent-glow);
    filter: brightness(1.2);
}

/* === DESKTOP GRID === */
@media (min-width: 768px) {
    body {
        padding: 40px;
    }
    .bento-container {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(3, 250px);
    }

    /* Asymetryczne rozmieszczenie */
    .bento-hero {
        grid-column: span 2;
        grid-row: span 2;
        min-height: 450px;
    }
    
    .bento-akademia {
        grid-column: span 2;
        grid-row: span 2;
    }

    .bento-uslugi {
        grid-column: span 1;
        grid-row: span 2;
    }

    .bento-cennik {
        grid-column: span 1;
        grid-row: span 2;
    }

    .bento-zespol {
        grid-column: span 2;
        grid-row: span 1;
    }

    .bento-mapa {
        grid-column: span 2;
        grid-row: span 1;
        min-height: auto;
    }
    
    .sticky-cta {
        bottom: 40px;
        right: 40px;
        left: auto;
        transform: none;
    }
    .sticky-cta:hover {
        transform: scale(1.05);
    }
}
/* Dark Mode Footer Texts */
body.dark-theme .footer-text-rodo,
body.dark-theme .footer-text-copyright {
    color: #FFFFFF !important;
    border-bottom-color: #FFFFFF !important;
    opacity: 0.6 !important;
}
