:root {
    --primary-color: #5b3a20; /* richer deep wood */
    --secondary-color: #a0794e; /* warm timber */
    --accent-color: #5f8a3d; /* moss green */
    --light-bg: #fbf7f2; /* parchment */
    --dark-text: #2b1f16;
    --light-text: #fffaf5;
    --border-color: #e7dfd6;
    --shadow: 0 8px 22px rgba(23,14,8,0.14);
    --font-primary: 'Lato', sans-serif;
    --font-secondary: 'Merriweather', serif;
}

* { box-sizing: border-box; }
html,body{ height:100%; margin:0; font-family:var(--font-primary); color:var(--dark-text); background:var(--light-bg); }

.container{ max-width:1140px; margin:0 auto; padding:0 20px; }

/* Header / Nav */
header{ background: linear-gradient(180deg, rgba(91,58,32,0.03), rgba(91,58,32,0.02)); border-bottom:1px solid var(--border-color); }
.logo-nav{ display:flex; align-items:center; }
.nav-logo{ height:56px; width:auto; }
.nav-links{ list-style:none; display:flex; gap:18px; align-items:center; margin:0; padding:16px 0; }
.nav-links a{ color:var(--dark-text); text-decoration:none; font-weight:600; }
.nav-toggle{ display:none; background:transparent; border:0; font-size:20px; }

/* Hero */
.hero{ background: linear-gradient(rgba(20,14,8,0.5), rgba(20,14,8,0.35)), url('images/wood-texture.jpg') center/cover no-repeat; color:var(--light-text); padding:80px 0; }
.hero h1{ font-family:var(--font-secondary); font-size:48px; margin:0 0 8px; color:#fff7ed; text-shadow:0 10px 26px rgba(0,0,0,0.36); }
.hero p{ font-size:18px; margin:0 0 18px; max-width:720px; }
.hero .btn{ margin-right:12px; }

/* Buttons */
.btn{ display:inline-block; padding:10px 18px; border-radius:8px; cursor:pointer; text-decoration:none; font-weight:700; }
.btn-primary{ background:linear-gradient(180deg,var(--primary-color),var(--accent-color)); color:var(--light-text); border:1px solid rgba(0,0,0,0.08); box-shadow:var(--shadow); }
.btn-secondary{ background:transparent; color:var(--primary-color); border:2px solid var(--secondary-color); }

/* Sections */
.section{ padding:60px 0; }
.section-shaded{ background:#fff; border-top:1px solid var(--border-color); }

/* Distinct section backgrounds for visual separation */
#sawmill{ background: linear-gradient(180deg, rgba(245,241,236,0.9), rgba(238,233,226,0.95)); }
#rental{ background: linear-gradient(180deg, rgba(250,248,244,0.9), rgba(243,239,233,0.95)); }
.content-split{ display:flex; gap:28px; align-items:flex-start; }
.text-content{ flex:1; }
.image-content{ flex:1; }

.offer-list{ display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; padding:0; list-style:none; }
.offer-item{ background:rgba(107,69,36,0.06); padding:12px 16px; border-radius:8px; border:1px solid rgba(0,0,0,0.03); }

/* Gallery */
.gallery-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:16px; }
.gallery-item img{ width:100%; height:160px; object-fit:cover; border-radius:8px; display:block; }
.gallery-button-wrapper{ margin-top:16px; }

/* Contact */
.contact-wrapper{ display:flex; gap:24px; align-items:flex-start; }
.contact-form{ flex:1; }
.contact-details{ width:320px; }
.form-group{ margin-bottom:12px; }
label{ display:block; margin-bottom:6px; font-weight:600; }
input, textarea{ width:100%; padding:10px; border:1px solid var(--border-color); border-radius:6px; font-size:14px; }

/* Footer */
footer{ padding:24px 0; text-align:center; font-size:14px; color:rgba(45,35,24,0.85); }

/* Modal (lightweight) */
.modal{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.7); z-index:1200; }
.modal[aria-hidden="false"]{ display:flex; }
.modal img{ max-width:90%; max-height:80%; border-radius:8px; }
.modal-close{ position:absolute; top:20px; right:24px; background:transparent; border:0; color:#fff; font-size:30px; }

/* Responsive */
@media (max-width:900px){
    .content-split{ flex-direction:column; }
    .nav-links{ display:none; position:absolute; right:20px; top:72px; background:var(--light-bg); flex-direction:column; padding:12px; border-radius:8px; box-shadow:var(--shadow); }
    .nav-links.active{ display:flex; }
    .nav-toggle{ display:block; }
}

/* Accessibility */
a:focus, button:focus, input:focus, textarea:focus{ outline:3px solid rgba(106,78,35,0.2); outline-offset:2px; }

/* Small tweaks */
.icon{ margin-right:6px; }

/* Tables (minimal) */
table{ border-collapse:collapse; width:100%; }
th,td{ padding:8px 10px; border:1px solid var(--border-color); }

/* Utilities */
.container .btn-hover:hover{ transform:translateY(-2px); }
/* --- Global Styles & Variables --- */
:root {
    --primary-color: #6A4E23; /* Main Brown */
    --secondary-color: #8B6B4A; /* Lighter Brown */
    --accent-color: #4CAF50; /* Green Accent - can be adjusted */
    --light-bg: #f8f4f0; /* Very Light Beige/Off-white */
    --dark-text: #333333;
    --light-text: #ffffff;
    --border-color: #dcdcdc;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --font-primary: 'Lato', sans-serif;
    --font-secondary: 'Merriweather', serif; /* For headings */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.8rem;
}

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

/* Optional: Add subtle underline to headings */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px; /* Soften image corners */
}

ul {
    list-style: none;
}

.section {
    padding: 60px 0;
}

.section-shaded {
    background-color: #ffffff; /* White background for contrast */
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--light-text);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}


/* --- Header & Navigation --- */
header {
    background-color: var(--light-text);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 60px; /* Adjust as needed */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 25px; /* Spacing between links */
}

.nav-links li a {
    color: var(--dark-text);
    font-weight: bold;
    padding: 5px 0;
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Underline effect on hover */
.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
    left: 0;
    background: var(--accent-color);
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
}


/* --- Hero Section (#main) --- */
.hero {
    background: url('images/wood-texture.jpg') no-repeat center center/cover; /* Ensure you have this image */
    /* Fallback background */
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 80px 0;
    text-align: center;
    position: relative; /* For overlay */
}

/* Optional: Add a subtle overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative; /* To stay above overlay */
    z-index: 2;
}

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

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-links .btn {
    margin: 0 10px;
    font-size: 1.1rem;
}
.hero-links .btn-primary {
     background-color: var(--accent-color); /* Make primary button stand out */
     border-color: var(--accent-color);
}
.hero-links .btn-primary:hover {
     background-color: #3e8e41; /* Darker green */
     border-color: #3e8e41;
}
.hero-links .btn-secondary {
     color: var(--light-text);
     border-color: var(--light-text);
}
 .hero-links .btn-secondary:hover {
     background-color: var(--light-text);
     color: var(--primary-color);
}

/* --- Offer Section --- */
.offer-list {
    list-style: none;
    padding-left: 0;
    max-width: 800px;
    margin: 0 auto; /* Center the list */
}

.offer-list li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    background-color: #fff; /* White cards for list items */
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.offer-list .icon {
    margin-right: 15px;
    font-size: 1.5rem; /* Adjust icon size */
    color: var(--accent-color);
}

Ukrywanie szczegółów oferty
.offer-details {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #f4f4f4;
    border: 1px solid #ccc;
}


/* 
.offer-item:hover {
    cursor: pointer;
} */



/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.gallery-item img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover; /* Crop images nicely */
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%; /* dopasowanie do siatki */
}

/* Styl hover + animacja */
.btn-hover {
    transition: all 0.3s ease;
    transform-origin: center;
}

.btn-hover:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background-color: #5a3e1b; /* lekko ciemniejszy brąz */
    border-color: #5a3e1b;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 40px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
  }
  
  .modal img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 30px rgba(255,255,255,0.3);
    border-radius: 10px;
  }
  
  .modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
  }

  .modal-nav {
    position: absolute;
    top: 50%;
    font-size: 2em;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    user-select: none;
}

#prev {
    left: 10px;
}

#next {
    right: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

  
  @keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
  }
  

/* --- Sawmill & Rental Split Content --- */
.content-split {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.content-split .text-content,
.content-split .image-content {
    flex: 1; /* Each takes half the space */
    min-width: 300px; /* Minimum width before wrapping */
}

.content-split .text-content ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 1.5rem;
}
.content-split .text-content ul li {
    margin-bottom: 0.5rem;
}

.content-split .image-content img {
     box-shadow: var(--shadow);
}


/* --- Forms (Pricing & Contact) --- */
.form-styled {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 600px; /* Limit form width */
    margin: 20px auto; /* Center form */
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease;
}

.form-group input[type="number"] {
     /* Specific styles for number inputs if needed */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(106, 78, 35, 0.2); /* Subtle focus ring */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resize */
    min-height: 120px;
}

.form-styled button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* Pricing results styling */
.results {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.results h3 {
     margin-bottom: 1rem;
     color: var(--primary-color);
}
.results p {
     margin-bottom: 0.5rem;
     font-size: 1.1rem;
}
.results p small {
     display: block;
     margin-top: 1rem;
     font-size: 0.9rem;
     color: #777;
}


/* --- Contact Section --- */
.contact-wrapper {
    display: flex;
    gap: 40px;
    flex-wrap: wrap; /* Wrap on smaller screens */
}

.contact-form {
    flex: 1.5; /* Form takes more space */
    min-width: 300px;
}

.contact-details {
    flex: 1;
    min-width: 280px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-details h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.contact-details .icon {
    font-size: 1.2rem;
    color: var(--accent-color);
    width: 20px; /* Align icons */
    text-align: center;
}

.contact-details a {
    color: var(--primary-color); /* Ensure links are styled */
}
.contact-details a:hover {
    text-decoration: underline;
}

.form-status {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}
.form-status.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border: 1px solid #c3e6cb;
}
.form-status.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red */
    border: 1px solid #f5c6cb;
}


/* --- Footer --- */
footer {
    background-color: var(--dark-text);
    color: var(--light-text);
    text-align: center;
    padding: 25px 0;
    margin-top: 40px; /* Ensure space above footer */
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc; /* Slightly lighter text */
}

/* --- Responsiveness --- */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero h1 { font-size: 3rem; }
    .hero p { font-size: 1.1rem; }

    .content-split {
        flex-direction: column; /* Stack text and image */
    }
    .content-split .image-content {
        margin-top: 20px;
    }

    .contact-wrapper {
         flex-direction: column;
    }
     .contact-details {
         margin-top: 20px; /* Add space when stacked */
     }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide desktop links */
        flex-direction: column;
        position: absolute;
        top: 70px; /* Position below header */
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 20px 0;
        text-align: center;
        gap: 15px;
    }

    .nav-links.active {
        display: flex; /* Show when active */
    }

    .nav-toggle {
        display: block; /* Show hamburger icon */
    }

    .hero { padding: 60px 0; }
    .hero h1 { font-size: 2.5rem; }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .form-styled { padding: 20px; }
    .contact-wrapper { gap: 20px; }
}

@media (max-width: 576px) {
    .container { width: 95%; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .hero-links .btn { display: block; margin: 10px auto; width: 80%;}

    .offer-list li { font-size: 1rem; padding: 10px;}
    .offer-list .icon { font-size: 1.2rem; }

    .gallery-grid { gap: 15px; }
    .gallery-item img { height: 200px; }

    .btn { padding: 10px 20px; font-size: 0.9rem;}
    .form-styled button[type="submit"] { padding: 12px; }
    .form-group input, .form-group textarea { padding: 10px;}
}

/* --- Tabela Wyceny --- */
.tabela-wyceny {
    display: none;
    margin-top: 20px;
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.tabela-wyceny th,
.tabela-wyceny td {
    padding: 12px;
    border: 1px solid var(--border-color);
}

.tabela-wyceny th {
    background-color: #f0f0f0;
    color: var(--primary-color);
    font-weight: bold;
}

.tabela-wyceny td:last-child {
    width: 120px;
}

/* --- Panel z przyciskami pod tabelą --- */
.kontrola-wyceny {
    display: none;
    margin-top: 20px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Styl mniejszych przycisków w tabeli --- */
.btn-small {
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 4px;
}
