/* CSS VARIABLES - MAXIMUM PERFORMANCE & CLEAN NAVIGATION */
:root {
    --primary: #8a1313; --primary-hover: #690e0e;
    --bg-main: #ffffff; --bg-alt: #f4f5f7; --bg-darker: #eef0f3; --bg-glass: rgba(255, 255, 255, 0.98);
    --text-main: #1a1a1a; --text-muted: #5a6270; --text-white: #ffffff;
    --border: #e1e4e8; --card-bg: #ffffff; --card-border: rgba(0,0,0,0.05);
    --shadow-sm: 0 4px 10px rgba(0,0,0,0.05); --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --font-sans: 'Outfit', sans-serif; --font-heading: 'Space Grotesk', sans-serif;
}
[data-theme="dark"] {
    --bg-main: #0a0a0c; --bg-alt: #121215; --bg-darker: #050505; --bg-glass: rgba(10, 10, 12, 0.98);
    --text-main: #f0f0f0; --text-muted: #9ba3af;
    --border: #222225; --card-bg: #151518; --card-border: rgba(255,255,255,0.05);
    --shadow-sm: 0 4px 10px rgba(0,0,0,0.3); --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-sans); background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.hardware-accel { transform: translateZ(0); will-change: transform; backface-visibility: hidden; }

/* TWARDY RESET LINKÓW NA CAŁEJ STRONIE W TYM PODKREŚLENIA */
a, a:link, a:visited, a:hover, a:active { text-decoration: none !important; }

/* BIAŁE LINKI W PANELU KONTAKTU */
.white-link, .white-link:link, .white-link:visited, .white-link:active, .white-link:hover,
.person a, .person a:link, .person a:visited, a[href^="tel:"], a[href^="mailto:"] { color: #ffffff !important; text-decoration: none !important; }
.person a:hover, .white-link:hover, a[href^="tel:"]:hover, a[href^="mailto:"]:hover { color: var(--primary) !important; }

/* ANIMACJA PRZEJŚĆ */
.page-transition-overlay { position: fixed; inset: 0; background: var(--bg-main); z-index: 999999; transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; opacity: 1; }
body.loaded .page-transition-overlay { opacity: 0; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; }
.flex-row { display: flex; flex-wrap: wrap; gap: 40px; }
.align-center { align-items: center; }
.text-center { text-align: center; }
.text-white { color: #fff !important; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.relative { position: relative; }
.z-10 { z-index: 10; }
.hidden { display: none !important; }
.overflow-hidden { overflow: hidden; }

h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 700; line-height: 1.1; }
.section-title { font-size: clamp(2rem, 4vw, 3.5rem); margin-bottom: 0.5rem; letter-spacing: -1px; }
.title-accent { width: 80px; height: 5px; background: var(--primary); margin-bottom: 2rem; border-radius: 2px; }
.title-accent.center { margin: 0 auto 2rem auto; width: 100px; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 4px; background: var(--primary); width: 100%; z-index: 9999; transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; font-size: 1rem; font-weight: 600; gap: 8px; border-radius: 50px; cursor: pointer; transition: background-color 0.2s, transform 0.2s; border: 2px solid transparent; color: inherit; }
.btn-primary { background-color: var(--primary); color: #fff !important; }
.btn-primary:hover { background-color: var(--primary-hover); transform: scale(1.02); }
.btn-outline { background-color: rgba(255,255,255,0.1); color: var(--text-main) !important; border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary) !important; }
.btn-block { width: 100%; }

/* NAVBAR (ZAWSZE jasne/szklane tło, zawsze ciemny tekst, logo natywne) */
.navbar { position: fixed; top: 0; left: 0; right: 0; background: var(--bg-glass); z-index: 1000; padding: 10px 0; transition: background-color 0.2s, padding 0.2s, box-shadow 0.2s; box-shadow: var(--shadow-sm); border-bottom: 1px solid var(--border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { height: 35px; width: auto; object-fit: contain; display: block; transition: filter 0.2s; }
.footer-logo { height: 35px; width: auto; object-fit: contain; }
[data-theme="dark"] .site-logo { filter: none !important; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-item { color: var(--text-main) !important; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; position: relative; }
.nav-item.btn-nav { background: var(--primary); color: #fff !important; padding: 8px 20px; border-radius: 20px; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; border-radius: 20px; overflow: hidden; background: var(--card-bg); border: 1px solid var(--border); transition: background 0.2s, border 0.2s; }
.lang-btn { background: transparent; color: var(--text-main) !important; border: none; padding: 6px 10px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: background 0.2s, color 0.2s; }
.lang-btn.active { background: var(--primary); color: #fff !important; }
.theme-toggle { background: var(--card-bg); border: 1px solid var(--border); width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; color: var(--text-main) !important; transition: transform 0.2s, background 0.2s, border 0.2s; }
.theme-toggle:hover { transform: rotate(15deg); }
.mobile-toggle { display: none; }

.hero { height: 100vh; min-height: 550px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=50&fm=webp') center/cover no-repeat; contain: paint; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; color: #fff; padding: 0 15px; }
.hero-badge { display: inline-block; padding: 5px 15px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); border-radius: 30px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; margin-bottom: 15px; }
.hero h1 { font-size: clamp(2rem, 5vw, 4.5rem); margin-bottom: 15px; text-transform: uppercase; }
.hero p { font-size: clamp(0.95rem, 1.5vw, 1.2rem); color: #ddd; margin-bottom: 30px; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.hero-buttons .btn-outline { color: #fff !important; border-color: rgba(255,255,255,0.5); }
.hero-buttons .btn-outline:hover { background: #fff !important; color: #000 !important; }

.ticker-wrap { width: 100%; overflow: hidden; background: var(--primary); color: #fff; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.1); contain: paint; }
.ticker { display: flex; white-space: nowrap; animation: ticker 15s linear infinite; }
.ticker-item { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; text-transform: uppercase; }
.ticker-separator { margin: 0 20px; font-size: 1rem; opacity: 0.5; }
@keyframes ticker { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-50%, 0, 0); } }

.section { padding: 70px 0; position: relative; contain: content; content-visibility: auto; contain-intrinsic-size: auto 600px; }
.bg-darker { background-color: var(--bg-darker); }
.text-content { flex: 1; min-width: 280px; }
.text-content p { font-size: clamp(0.95rem, 1.2vw, 1.05rem); color: var(--text-muted); margin-bottom: 15px; }
.image-content { flex: 1; min-width: 280px; position: relative; }
.rounded-img { width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; display: block; }
.stat-overlay { position: absolute; bottom: -15px; left: -15px; background: var(--card-bg); padding: 15px; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 2; }
.stat-num { font-size: clamp(2rem, 3vw, 2.5rem); color: var(--primary); line-height: 1; }

.bento-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 30px; }
@media (min-width: 768px) { .bento-gallery { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-auto-rows: 250px; gap: 15px; } .item-large { grid-row: span 2; } .item-wide { grid-column: span 2; } }
@media (max-width: 767px) { .bento-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; } .item-wide { grid-column: span 2; grid-auto-rows: 150px; } }
.bento-item { position: relative; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); display: block; transform: translateZ(0); }
.bento-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.bento-item:hover img { transform: scale(1.05); }
.bento-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 15px; color: #fff; }
.bento-overlay h3 { font-size: clamp(0.9rem, 1.2vw, 1.2rem); margin-bottom: 2px; color: #fff !important;}
.bento-overlay p { font-size: clamp(0.7rem, 0.9vw, 0.85rem); color: #ccc !important; }

.subpage-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.sub-img-card { position: relative; background: var(--card-bg); border: 1px dashed var(--border); border-radius: 12px; height: 250px; display:flex; align-items:center; justify-content:center; overflow:hidden;}
.sub-img-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; z-index: 1;}
.placeholder-text { z-index: 0; color: var(--text-muted); font-weight: bold; }

/* KLIKALNE KARTY OFERTY */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 15px; }
.premium-card { background: var(--card-bg); border-radius: 12px; padding: 25px 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.clickable-card { display: block; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; cursor: pointer; color: var(--text-main) !important; }
.clickable-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(138, 19, 19, 0.3); color: var(--text-main) !important; }
.clickable-card * { text-decoration: none !important; }
.clickable-card h3 { font-size: clamp(1.1rem, 1.5vw, 1.3rem); margin-bottom: 8px; color: var(--text-main) !important; }
.clickable-card p { font-size: clamp(0.85rem, 1vw, 0.95rem); color: var(--text-muted) !important; }
.clickable-card .read-more { display: block; margin-top: 15px; font-size: 0.85rem; font-weight: 800; color: var(--primary) !important; transition: transform 0.2s; }
.clickable-card:hover .read-more { transform: translateX(5px); }

.card-icon-wrapper { width: 40px; height: 40px; background: rgba(138, 19, 19, 0.1); color: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.card-icon-wrapper svg { width: 20px; height: 20px; }

/* GLOW EFFECT DLA FORMULARZA KIEDY KLIKNIETO W EMAIL */
@keyframes formPulse {
    0% { box-shadow: 0 0 0 0 rgba(138, 19, 19, 0.4); border-color: var(--primary); }
    70% { box-shadow: 0 0 0 15px rgba(138, 19, 19, 0); border-color: var(--border); }
    100% { box-shadow: 0 0 0 0 rgba(138, 19, 19, 0); border-color: var(--border); }
}
.form-highlight { animation: formPulse 1.5s ease-out; }

/* KONTAKT */
.contact-wrapper { display: flex; flex-wrap: wrap; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.contact-info-panel { flex: 1; min-width: 320px; background: #111; color: #fff; padding: clamp(25px, 4vw, 40px); background-image: radial-gradient(circle at top right, #380d0d, #000); }
.contact-block { margin-bottom: 20px; }
.contact-block h4 { color: #888; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; margin-bottom: 5px; }
.contact-block p { font-size: clamp(0.9rem, 1.2vw, 1rem); }

.contact-persons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 15px; }
.person { background: rgba(255,255,255,0.06); padding: 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); }
.person-lang { font-size: 0.65rem; background: var(--primary); color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; display: inline-block; letter-spacing: 0.5px;}
.person-name { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 5px; color: #fff; }
.person a { display: block; font-size: 0.85rem; margin-bottom: 3px; transition: color 0.2s;}

.contact-form-panel { flex: 1.5; min-width: 260px; padding: clamp(25px, 4vw, 40px); background: var(--card-bg); transition: box-shadow 0.3s; border: 1px solid transparent; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.85rem; }
.custom-input { width: 100%; padding: 10px 12px; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; color: var(--text-main); font-family: var(--font-sans); font-size: 0.95rem; outline: none; }
.custom-input:focus { border-color: var(--primary); }

footer { background: #050505; color: #fff; padding: 40px 0 20px; border-top: 1px solid #1a1a1a; contain: content; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #1a1a1a; }
.text-gray { color: #888; font-size: 0.8rem; }
.footer-links { display: flex; gap: 15px; flex-wrap: wrap; }
.footer-links a { color: #ccc !important; font-weight: 600; font-size: 0.85rem; }
.footer-bottom { text-align: center; color: #555; font-size: 0.75rem; }

@media (max-width: 768px) {
    .nav-links { position: fixed; top: 0; right: -100%; width: 240px; height: 100vh; background: var(--bg-main); border-left: 1px solid var(--border); flex-direction: column; justify-content: center; padding: 30px; transition: right 0.25s ease-out; box-shadow: -5px 0 15px rgba(0,0,0,0.1); z-index: 999; }
    .nav-links.nav-active { right: 0; }
    .nav-item { color: var(--text-main) !important; font-size: 1rem; margin-bottom: 10px; width: 100%; text-align:left;}
    .nav-item.btn-nav { text-align: center; margin-top:10px;}
    .mobile-toggle { display: flex; flex-direction: column; justify-content: space-between; width: 25px; height: 18px; background: transparent; border: none; cursor: pointer; z-index: 1001; }
    .mobile-toggle span { display: block; height: 2px; width: 100%; border-radius: 2px; background: var(--text-main); transition: transform 0.2s, opacity 0.2s; }
    .mobile-toggle.active span:nth-child(1) { transform: translate3d(0, 8px, 0) rotate(45deg); background: var(--text-main); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: translate3d(0, -8px, 0) rotate(-45deg); background: var(--text-main); }
    .parity-row { flex-direction: column; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .contact-persons { grid-template-columns: 1fr; }
}
