:root {
    --bs-primary: #0066cc;
    --bs-danger: #ff6b6b;
}

/* Optimize rendering */
* {
    box-sizing: border-box;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    will-change: transform;
}

/* Navbar customization */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
    color: var(--bs-dark) !important;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Phone links */
.phone-link {
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.phone-link:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.phone-link:active {
    transform: scale(0.95);
}

/* Hero section with optimized background */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 80px 20px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hydraulik.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    will-change: transform;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.emergency-text {
    font-size: 2rem;
    font-weight: bold;
    color: #ff4444;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.service-area {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Cards hover effect */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Contact section */
.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: scale(1.05);
}

/* Custom button styles */
.btn-danger {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.btn-danger:hover {
    background-color: #ff5252;
    border-color: #ff5252;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.85rem;
    }

    .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .emergency-text {
        font-size: 1.2rem;
    }

    .phone-link {
        padding: 0.5rem;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .nav-link {
        padding: 0.2rem 0.3rem !important;
        font-size: 0.8rem;
    }

    .d-flex {
        gap: 0.3rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.2rem;
    }

    .emergency-text {
        font-size: 1.1rem;
    }

    .service-area {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }

    .phone-link {
        padding: 0.3rem;
    }
}

/* Realizations section */
.realization-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.realization-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.realization-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.realization-card:hover img {
    transform: scale(1.1);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #bbb;
}

/* Placeholder for missing images */
.realization-card img[src*="realizacja"] {
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
}

.realization-card img[src*="realizacja"]::before {
    content: "Zdjęcie realizacji";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
} 