﻿/* ============================================
   MASZYNY S.C. - AUTORSKI CSS (POPRAWIONY)
   ============================================ */

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #455A64;
    --secondary-dark: #263238;
    --accent: #A74100;
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #616161;
    --text-light: #9E9E9E;
    --border: #E0E0E0;
    --shadow: rgba(0,0,0,0.08);
    --shadow-hover: rgba(0,0,0,0.12);
    --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --section-padding: 5rem;
    --container-max: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Skip link (visually hidden, visible on focus) */
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{position:fixed;left:16px;top:16px;width:auto;height:auto;padding:0.5rem 1rem;background:var(--surface);color:var(--text-primary);z-index:2000;border-radius:6px;box-shadow:0 2px 8px var(--shadow)}

/* Generic visually-hidden utility (for accessible headings) */
.visually-hidden{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Nawigacja górna */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    padding: 0.75rem 0;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.logo:hover .logo-text {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section z animowanym tłem */
.hero {
    margin-top: 70px;
    background: linear-gradient(135deg, #1a2a3a 0%, #0f1a24 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* Animowane tło - moving gradient */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(46,125,50,0.15) 0%, 
        rgba(46,125,50,0.05) 25%,
        rgba(167,65,0,0.10) 50%,
        rgba(46,125,50,0.05) 75%,
        rgba(46,125,50,0.15) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

/* Dodatkowy efekt - delikatne kropki */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

@keyframes gradientShift {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.hero-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SLIDER zdjęć po prawej stronie */
.hero-slider-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.2);
}

.hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide-img.active {
    opacity: 1;
}

/* Strzałki slidera */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 15px;
}

.slider-arrow.next {
    right: 15px;
}

/* Kropki nawigacyjne slidera */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-light);
    width: 24px;
    border-radius: 5px;
}

.slider-dot:hover {
    background: white;
}

/* Przyciski */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(46,125,50,0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(46,125,50,0.4);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: white;
    color: var(--secondary-dark);
    border-color: white;
}

/* Sekcje ogólne */
.section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(46,125,50,0.15);  /* zmiana: przyciemnione tło */
    color: #1B5E20;                    /* zmiana: ciemniejsza zieleń – wyższy kontrast */
    font-weight: 700;                  /* dodane pogrubienie */
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

/* O Firmie */
.about {
    background: var(--surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.about-content strong {
    color: var(--primary);
    font-weight: 600;
}

.timeline {
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
}

.timeline-item {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--surface);
}

.timeline-year {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
}

/* Produkty (Maszyny) */
.products {
    background: var(--background);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--shadow-hover);
}

.product-header {
    background: #1E5A20;   /* zmiana: ciemniejszy zielony (zamiast #2E7D32) */
    color: #F5F5F5;        /* zmiana: jasnoszary zamiast białego – lepszy kontrast */
    padding: 1.5rem;
    position: relative;
}

.product-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.product-header .product-subtitle {
    font-size: 0.9rem;
    opacity: 1;
    color: #F5F5F5;
    text-shadow: 0 1px 0 rgba(0,0,0,0.25);
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #8B3A00;   /* zmiana: ciemniejszy pomarańcz (zamiast #A74100) */
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 2px solid rgba(255,255,255,0.12);
}

/* Ensure badge is visible when header uses the same accent background */
.product-header .product-badge {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.18);
}

.product-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-specs {
    list-style: none;
    margin-bottom: 1.5rem;
}

.product-specs li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.product-specs li:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.product-content .btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 0;
}

/* Farmmesh Products */
.farmmesh-products {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--border);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tab-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.products-farmmesh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.farmmesh-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.farmmesh-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0,0,0,0.15);
}

.farmmesh-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f0f2f5;
    display: block;
}

.farmmesh-card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.farmmesh-card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 2.8rem;
}

.farmmesh-card-content .btn-outline {
    margin-top: auto;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1rem;
    text-align: center;
    border-radius: 40px;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
}

.farmmesh-card-content .btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Klienci */
.clients-badge {
    background: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.clients-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Definicje */
.definitions {
    background: var(--surface);
}

.definitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.definition-card {
    padding: 2rem;
    background: var(--background);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.definition-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px var(--shadow);
}

.definition-term {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.definition-term::before {
    content: '⚙';
    color: var(--primary);
    font-size: 1.5rem;
}

.definition-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* FAQ */
.faq {
    background: var(--background);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: rgba(46,125,50,0.05);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    color: var(--primary);
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px;
}

/* Kontakt */
.contact {
    background: var(--secondary-dark);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-subtitle {
    color: rgba(255,255,255,0.8);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}

.contact-details {
    list-style: none;
    margin-bottom: 2rem;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: rgba(255,255,255,0.9);
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-details strong {
    color: white;
    display: block;
    margin-bottom: 0.25rem;
}

.contact-map {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    background: var(--secondary);
    height: 400px;
}

/* Flag Section */
.lang-section {
    background: var(--surface);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    list-style: none;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    background: var(--background);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-item:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.lang-item img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
}

/* Footer */
.main-footer {
    background: #0a1c2f;
    color: #cbd5e1;
    padding: 48px 0 32px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 32px;
}

.footer-info {
    flex: 2;
}

.footer-links-side {
    flex: 1;
    text-align: right;
}

.footer-copyright-main {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.footer-description {
    font-size: 0.8rem;
    margin: 8px 0;
    opacity: 0.8;
    line-height: 1.5;
}

.footer-digital {
    font-size: 0.8rem;
    margin: 8px 0;
}

.footer-standards {
    font-size: 0.75rem;
    margin: 8px 0;
    opacity: 0.7;
    font-family: monospace;
}

.footer-case {
    font-size: 0.8rem;
    margin: 8px 0;
}

.footer-link-highlight {
    color: #5fcb8a;
    text-decoration: none;
}

.footer-link-highlight:hover {
    text-decoration: underline;
}

.footer-nav-links {
    margin-bottom: 16px;
}

.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-link:hover {
    color: #5fcb8a;
}

.separator {
    margin: 0 8px;
    opacity: 0.5;
}

/* Stronger separator color in footer for contrast */
.footer-nav-links .separator {
    color: rgba(255,255,255,0.72);
    opacity: 1;
}

.footer-partner {
    font-size: 0.75rem;
    margin-top: 16px;
    opacity: 0.7;
}

.footer-logo {
    max-width: 120px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* ============================================
   POPRAWKI DOSTĘPNOŚCI (ACCESSIBILITY)
   ============================================ */

/* Wyróżnienie linków – nie tylko kolorem (zawsze podkreślenie) */
.footer-link,
.footer-link-highlight,
.footer-digital a,
.about-content a,
.product-description a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Widoczny fokus dla nawigacji klawiaturowej */
:focus {
    outline: 3px solid #FFB74D;
    outline-offset: 2px;
}

/* Dostosowanie koloru tła dla kart LS9 i Fixed Knot (zapewnienie kontrastu) */
.product-card:nth-child(2) .product-header {
    background: #2C3E4E;   /* ciemniejszy granat zamiast #455A64 */
}
.product-card:nth-child(3) .product-header {
    background: #7A3A00;   /* ciemniejszy pomarańcz zamiast #A74100 */
}

/* ============================================
   MEDIA QUERIES (bez zmian)
   ============================================ */

@media (max-width: 800px) {
    .hero-container, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-links {
        display: none;
    }
    .section-title {
        font-size: 1.75rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-links-side {
        text-align: center;
    }
    .category-tabs {
        gap: 0.5rem;
    }
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    :root {
        --section-padding: 3rem;
    }
    .lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .slider-arrow {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}.boxedcontainer{max-width:1170px;margin:auto;padding:0 30px}.tp-banner-container{width:100%;position:relative;padding:0;padding-top:0}.tp-banner{width:100%;position:relative}.tp-banner-fullscreen-container{width:100%;position:relative;padding:0}