/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --background-color: #f9f9f9;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--accent-color);
}

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

.hidden {
    display: none;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: white;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

/* Styl dla kontenerów particles.js */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#particles-loading {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
}

.wood-shaving {
    position: absolute;
    border-radius: 30% 5px 5px 30%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.3);
    transform-origin: center;
}

/* Różne style wiórków dla większej różnorodności */
.wood-shaving:nth-child(1) { left: 10%; top: -10%; animation-delay: 0.2s; transform: rotate(15deg) rotateX(45deg); width: 35px; height: 5px; }
.wood-shaving:nth-child(2) { left: 30%; top: -20%; animation-delay: 0.5s; transform: rotate(45deg) rotateX(60deg); width: 50px; height: 4px; }
.wood-shaving:nth-child(3) { left: 50%; top: -15%; animation-delay: 0.8s; transform: rotate(75deg) rotateX(30deg); width: 45px; height: 6px; }
.wood-shaving:nth-child(4) { left: 70%; top: -25%; animation-delay: 1.1s; transform: rotate(30deg) rotateX(50deg); width: 55px; height: 5px; }
.wood-shaving:nth-child(5) { left: 90%; top: -10%; animation-delay: 1.4s; transform: rotate(60deg) rotateX(40deg); width: 40px; height: 4px; }
.wood-shaving:nth-child(6) { left: 20%; top: -30%; animation-delay: 1.7s; transform: rotate(90deg) rotateX(55deg); width: 60px; height: 3px; }
.wood-shaving:nth-child(7) { left: 40%; top: -5%; animation-delay: 2.0s; transform: rotate(120deg) rotateX(35deg); width: 48px; height: 5px; }
.wood-shaving:nth-child(8) { left: 60%; top: -15%; animation-delay: 2.3s; transform: rotate(150deg) rotateX(45deg); width: 42px; height: 4px; }
.wood-shaving:nth-child(9) { left: 80%; top: -20%; animation-delay: 2.6s; transform: rotate(180deg) rotateX(60deg); width: 38px; height: 5px; }
.wood-shaving:nth-child(10) { left: 15%; top: -25%; animation-delay: 2.9s; transform: rotate(210deg) rotateX(40deg); width: 52px; height: 4px; }
.wood-shaving:nth-child(11) { left: 35%; top: -10%; animation-delay: 3.2s; transform: rotate(240deg) rotateX(50deg); width: 46px; height: 5px; }
.wood-shaving:nth-child(12) { left: 85%; top: -15%; animation-delay: 3.5s; transform: rotate(270deg) rotateX(35deg); width: 55px; height: 4px; }

/* Prostsza animacja spadania wiórków */
@keyframes fall {
    0% {
        top: -50px;
        opacity: 0;
        transform: rotate(0deg);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
        transform: rotate(360deg);
    }
}

.loading-bar {
    width: 300px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    width: 0;
    background-color: var(--secondary-color);
    border-radius: 5px;
    transition: width 0.5s ease;
}

/* Hero Section */
#hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.wood-shavings-hero .wood-shaving {
    background: linear-gradient(to bottom, rgba(255, 240, 220, 0.9), rgba(255, 230, 200, 0.7));
    box-shadow: 0 1px 5px rgba(255, 255, 255, 0.3);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
    color: white;
}

.hero-tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1s;
    color: white;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1.5s;
}

.cta-button:hover {
    background-color: #16a085;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

/* About Section */
#about {
    padding: 5rem 0;
    background-color: white;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.image-frame::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.image-frame img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-frame:hover img {
    transform: scale(1.05);
}

/* Gallery Section */
#gallery {
    padding: 5rem 0;
    background-color: var(--light-color);
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-item::before {
    content: '';
    display: block;
    padding-top: 75%;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Contact Section */
#contact {
    padding: 5rem 0;
    background-color: white;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1rem;
}

.social-media {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 1.5rem;
}

input, textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    transition: var(--transition);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: white;
}

.footer-nav a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .about-content, .contact-content {
        flex-direction: column;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .container {
        width: 95%;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal for Gallery */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--secondary-color);
}

/* Placeholder for images */
.placeholder-img {
    background-color: #e0e0e0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section animations */
.section-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}
