/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-display: swap;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    will-change: scroll-position;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: #fbbf24;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #fbbf24;
    color: #1f2937;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.cta-button:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

/* Calculator Section */
.calculator-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.calculator-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: #1f2937;
}

.calculator {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 1.2rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    min-height: 60px;
}

.input-group input[type="number"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group input[type="number"]:hover {
    border-color: #6b7280;
}

/* Larger touch targets for mobile */
@media (max-width: 768px) {
    .input-group input[type="number"] {
        padding: 1.5rem 1.2rem;
        font-size: 1.3rem;
        margin: 0.8rem 0;
        min-height: 70px;
    }

    }

    /* Scroll to top button styles */
    .scroll-to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: rgba(37, 99, 235, 0.9);
        color: white;
        border: none;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        z-index: 1000;
        backdrop-filter: blur(10px);
    }

    .scroll-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .scroll-to-top:hover {
        background: rgba(37, 99, 235, 1);
        transform: scale(1.1);
    }

.calculate-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 1.2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    min-height: 60px;
}

.calculate-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.result {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #ecfdf5;
    border-radius: 0.5rem;
    border-left: 4px solid #10b981;
    display: none;
}

.result.show {
    display: block;
}

.result h3 {
    color: #059669;
    margin-bottom: 0.5rem;
}

/* Guide Section */
.guide-section {
    padding: 4rem 0;
    background: white;
    text-align: center;
}

.guide-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.guide-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

.guide-btn {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.guide-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Consultation Section */
.consultation-section {
    padding: 4rem 0;
    background: #f8fafc;
    text-align: center;
}

.consultation-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.consultation-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

.consultation-btn {
    display: inline-block;
    background: #8b5cf6;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.consultation-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Reviews Section */
.reviews-section {
    padding: 4rem 0;
    background: white;
}

.reviews-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.review {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.review:hover {
    transform: translateY(-5px);
}

.stars {
    font-size: 1.5rem;
    color: #fbbf24;
    margin-bottom: 1rem;
}

.review p {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}



.review-author span {
    font-weight: bold;
    color: #374151;
}

/* Banks Section */
.banks-section {
    padding: 4rem 0;
    background: #f8fafc;
    text-align: center;
}

.banks-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.banks-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #6b7280;
}

.banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.bank-item {
    background: white;
    padding: 2rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.bank-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.bank-logo {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.bank-logo img {
    max-height: 60px;
    max-width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.bank-item h3 {
    font-size: 1.1rem;
    color: #374151;
    font-weight: 600;
}

.banks-note {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.banks-note p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.banks-note p:first-child {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .banks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .bank-item {
        padding: 1.5rem 1rem;
    }

    .bank-logo {
        height: 60px;
    }

    .bank-logo img {
        max-height: 45px;
        max-width: 120px;
    }

    .banks-note {
        padding: 1.5rem;
    }

    .banks-note p:first-child {
        font-size: 1.1rem;
    }

    .banks-note p {
        font-size: 1rem;
    }
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: white;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: #374151;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form button {
    background: #2563eb;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.contact-form button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.contact-map iframe {
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-area {
    margin-bottom: 1rem;
    color: #9ca3af;
}

.footer-copyright {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    color: #9ca3af;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .container {
        padding: 0 1rem;
    }

    .calculator {
        padding: 2rem 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .gallery-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Mobile scroll to top button adjustments */
    button[aria-label="Wróć na górę strony"] {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
    contain: layout style paint;
}

section {
    content-visibility: auto;
    contain: layout style paint;
}

/* Optimize animations */
* {
    will-change: auto;
}

.hero::before {
    will-change: transform;
}

/* Lazy loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* PWA styles */
@media (display-mode: standalone) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
}