:root {
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #4b5563;
    --accent-green: #15803d;
    --accent-blue: #1d4ed8;
    --border-color: #e5e7eb;
    --max-width: 1200px;
    --radius: 12px;
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Menu górne */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    transform: translateY(0);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    background: var(--accent-blue);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.logo-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--accent-blue);
}

/* Hero */
.hero {
    padding: 5rem 2rem 4rem;
    background: radial-gradient(circle at 80% 20%, rgba(29, 78, 216, 0.04), transparent),
                radial-gradient(circle at 20% 80%, rgba(21, 128, 61, 0.04), transparent);
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('images/cekcyn.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.15rem;
    color: white;
    max-width: 650px;
    margin: 0 auto;
}

.construction-notice {
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.dash-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dash-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.25rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.card-main {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: var(--radius);
}

.card-main h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.card-main p {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1rem;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.spec-table td {
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table td.label {
    color: var(--text-muted);
    font-weight: 500;
    width: 40%;
}

.spec-table td.value {
    font-weight: 600;
    color: var(--text-main);
}

.gallery-section {
    margin-bottom: 4rem;
}

.gallery-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.gallery-img-wrapper {
    width: 100%;
    height: 220px;
    background-color: #e5e7eb;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    cursor: pointer;
}

.gallery-card:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 1.25rem;
}

.gallery-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.gallery-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.blog-section {
    margin-top: 1.5rem;
    margin-bottom: 3rem;
}

.blog-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    border-color: #d1d5db;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.blog-category {
    background: rgba(29, 78, 216, 0.08);
    color: var(--accent-blue);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-category.field {
    background: rgba(21, 128, 61, 0.08);
    color: var(--accent-green);
}

.blog-date {
    color: var(--text-muted);
}

.blog-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.blog-card p.excerpt {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.blog-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-link:hover {
    text-decoration: underline;
}

.solar-widget {
    background: #0f172a;
    color: #f8fafc;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

.qsl-bar {
    background: var(--text-main);
    color: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.qsl-info h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.qsl-info p { color: #9ca3af; font-size: 0.95rem; }

.qsl-badges {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.badge-el {
    background: rgba(255,255,255,0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.badge-el:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    top: 20px; right: 30px;
    color: #f1f1f1; font-size: 45px; font-weight: bold;
}

.lightbox-close:hover { color: var(--accent-blue); }

#lightbox-caption {
    margin-top: 15px;
    color: #e5e7eb;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
    font-weight: 500;
}

/* Przycisk powrotu na górę */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-blue);
    color: white;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.back-to-top:hover {
    background-color: #1e3a8a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* RWD */
@media (max-width: 968px) {
    .info-grid { grid-template-columns: 1fr; gap: 2rem; }
    .nav-container { flex-direction: column; gap: 1.25rem; text-align: center; }
    nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem 1.5rem; }
}

@media (max-width: 768px) {
    .back-to-top { bottom: 20px; right: 20px; width: 45px; height: 45px; }
}

@media (max-width: 480px) {
    .logo-block { flex-direction: column; gap: 0.5rem; }
    nav ul { gap: 0.75rem 1rem; }
    nav ul li a { font-size: 0.85rem; }
    .hero h1 { font-size: 2rem; }
}