/* ==========================================================================
   Grafcom v2 - Modern Light Design
   ========================================================================== */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --gradient: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    --navy: #1e3a5f;
    --navy-light: #2d4a6f;

    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-dark: #0f172a;

    --text: #334155;
    --text-light: #64748b;
    --text-dark: #1e293b;

    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Section Badge */
.section-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50px;
    margin-bottom: 16px;
}

/* Section Header */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
}

/* ==================== Header ==================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo img {
    height: 50px;
    width: auto;
}

#nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

#nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    position: relative;
}

#nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

#nav a:hover::after,
#nav a.active::after {
    width: 100%;
}

#nav a:hover,
#nav a.active {
    color: var(--primary);
}

.header-cta {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: var(--gradient);
    border-radius: var(--radius);
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ==================== Hero ==================== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

#hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50px;
    margin-bottom: 24px;
}

.hero-content h1 {
    font-size: 64px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 400px;
    filter: drop-shadow(0 20px 40px rgba(59, 130, 246, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-bottom-left-radius: 50% 20%;
    z-index: 1;
}

/* ==================== Stats ==================== */
#stats {
    padding: 60px 0;
    background: var(--bg-alt);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* ==================== Services ==================== */
#uslugi {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    padding: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 24px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.service-link i {
    font-size: 12px;
    transition: var(--transition);
}

.service-link:hover i {
    transform: translateX(4px);
}

/* ==================== Portfolio ==================== */
#portfolio {
    padding: 100px 0;
    background: var(--bg-alt);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.portfolio-overlay span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-cta {
    text-align: center;
    margin-top: 50px;
}

.portfolio-cta p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ==================== Why Us ==================== */
#dlaczego-my {
    padding: 100px 0;
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.why-us-content h2 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.why-us-content > p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.why-us-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.why-us-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.why-us-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 50%;
    flex-shrink: 0;
}

.why-us-icon i {
    color: white;
    font-size: 14px;
}

.why-us-item h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.why-us-item p {
    font-size: 14px;
    color: var(--text-light);
}

.why-us-image {
    position: relative;
}

.why-us-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.why-us-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.2;
}

/* ==================== Contact ==================== */
#kontakt {
    padding: 100px 0;
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.contact-info > p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-item:hover {
    box-shadow: var(--shadow);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: var(--radius);
}

.contact-icon i {
    font-size: 18px;
    color: var(--primary);
}

.contact-item span {
    font-size: 13px;
    color: var(--text-light);
}

.contact-item strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-social {
    display: flex;
    gap: 12px;
}

.contact-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    transition: var(--transition);
}

.contact-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-form-wrapper input::placeholder,
.contact-form-wrapper textarea::placeholder {
    color: var(--text-light);
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.captcha-group label {
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
}

.captcha-group label span {
    font-weight: 600;
    color: var(--primary);
}

.captcha-group input {
    max-width: 120px;
}

#form-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
    font-size: 14px;
}

#form-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

#form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ==================== Footer ==================== */
#footer {
    background: var(--bg-dark);
    color: white;
    padding: 80px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: white;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-contact i {
    color: var(--primary-light);
    width: 16px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==================== Lightbox ==================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary-light);
    transform: rotate(90deg);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius);
}

.lightbox-caption {
    margin-top: 20px;
    color: white;
}

.lightbox-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.lightbox-caption p {
    color: rgba(255, 255, 255, 0.6);
}

/* ==================== Go to Top ==================== */
#go-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
    z-index: 999;
}

#go-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#go-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .header-cta {
        display: none;
    }

    #nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    #nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    #nav ul {
        flex-direction: column;
        gap: 20px;
    }

    #hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-desc {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        max-width: 250px;
    }

    .hero-bg {
        display: none;
    }

    .section-header h2,
    .why-us-content h2,
    .contact-info h2 {
        font-size: 32px;
    }

    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .why-us-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .why-us-image {
        order: -1;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .captcha-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .captcha-group input {
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 36px;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}
