/* ========================================
   PALET-POL - Modern Styles
   ======================================== */

:root {
    --primary: #9c2f1b;
    --primary-dark: #6d2014;
    --primary-light: #c45a45;
    --secondary: #1A1A1A;
    --accent: #C41E3A;
    --dark: #1A1A1A;
    --dark-gray: #2D2D2D;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --bg-cream: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--bg-cream);
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4 {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

/* ========================================
   Header
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: -160px;
}

.logo-icon {
    width: 400px;
    height: auto;
    max-width: 400px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: 'Oswald', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 1px;
}

.logo-tagline {
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #1A1A1A;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

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

.nav-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: var(--radius);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F5F5F5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: visible;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    max-width: 1600px;
}

.hero-title {
    font-size: 56px;
    color: #1A1A1A;
    margin-bottom: 24px;
}

.hero-title .highlight {
    color: var(--primary);
    position: relative;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
}

.hero-visual {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
}

.hero-visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.pallet-illustration {
    position: relative;
    width: 320px;
    height: 280px;
}

.pallet {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) perspective(800px) rotateX(60deg) rotateZ(-45deg);
    transform-style: preserve-3d;
}

.pallet-top {
    width: 200px;
    height: 140px;
    background: linear-gradient(135deg, #C4A77D 0%, #A68B5B 100%);
    border-radius: 4px;
    box-shadow: 
        0 0 0 4px #8B6914,
        0 0 0 8px #6B4F10,
        0 10px 30px rgba(0,0,0,0.3);
}

.pallet-top::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 18px,
        rgba(0,0,0,0.1) 18px,
        rgba(0,0,0,0.1) 20px
    );
}

.pallet-blocks {
    position: absolute;
    bottom: -30px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
}

.pallet-blocks div {
    width: 28px;
    height: 30px;
    background: linear-gradient(180deg, #9B7B3B 0%, #7A5F2D 100%);
    border-radius: 2px;
}

.pallet-bottom {
    position: absolute;
    bottom: -35px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, #7A5F2D 0%, #5A4518 100%);
    border-radius: 2px;
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #1A1A1A;
    margin-bottom: 12px;
}

.section-title {
    font-size: 42px;
    color: #1A1A1A;
}

/* ========================================
   About Section
   ======================================== */

.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 17px;
    color: var(--gray);
    margin-bottom: 20px;
}

.about-features {
    list-style: none;
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.about-features li {
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-gray);
}

.about-image {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.about-image img {
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.about-image img:first-child {
    max-width: 400px;
    width: 100%;
}

.about-image-secondary {
    max-width: 250px !important;
    width: 100%;
}

.image-placeholder {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: linear-gradient(135deg, var(--light-gray) 0%, #E8E8E8 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 15px;
    border: 2px dashed #CCC;
}

/* ========================================
   Products Section
   ======================================== */

.products {
    background: var(--bg-cream);
}

.certyfikaty {
    background: var(--white);
}

.certyfikaty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.certyfikat-card {
    background: var(--bg-cream);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.certyfikat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.certyfikat-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.certyfikat-card h3 {
    font-size: 20px;
    color: var(--dark);
    margin-bottom: 12px;
}

.certyfikat-card p {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.6;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    justify-content: center;
}

.galeria {
    background: var(--white);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
}

.galeria-item {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.galeria-item-tall {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.product-name {
    font-size: 20px;
    color: #1A1A1A;
    margin-bottom: 12px;
}

.product-desc {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

/* ========================================
   Services Section
   ======================================== */

.services {
    background: var(--white);
}

.services-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-item:last-child {
    grid-column: span 2;
}

.service-item {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--bg-cream);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.service-item:hover {
    box-shadow: var(--shadow);
}

.service-number {
    font-family: 'Oswald', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.3;
    line-height: 1;
}

.service-content h3 {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 8px;
}

.service-content p {
    font-size: 15px;
    color: var(--gray);
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.contact .section-tag {
    color: var(--white);
}

.contact .section-title {
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
}

.contact-icon {
    font-size: 28px;
    background: transparent;
    width: auto;
    height: auto;
}

.nip-icon {
    font-size: 14px;
    font-weight: 700;
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: #FFFFFF !important;
}

.contact-item p {
    font-size: 15px;
    color: #FFFFFF !important;
    line-height: 1.5;
}

.contact-map {
    margin-top: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    color: var(--dark);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 24px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form input,
.form textarea {
    padding: 14px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--white);
}

.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form textarea {
    resize: vertical;
    min-height: 120px;
}

.form .btn {
    width: 100%;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #E0E0E0;
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-name {
    color: #000000;
}

.footer-brand p {
    color: #000000;
    font-size: 14px;
}

.footer h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #000000;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-contact p {
    color: #000000;
    font-size: 14px;
    line-height: 1.8;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #000000;
    text-align: center;
}

.footer-bottom p {
    color: #000000;
    font-size: 13px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .hero .container,
    .about-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certyfikaty-grid {
        grid-template-columns: 1fr;
    }
    
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-visual {
        display: none;
    }
    
    .services-list {
        grid-template-columns: 1fr !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    /* Ukryj galerię na telefonie */
    .galeria {
        display: none;
    }
    
    /* Ukryj hamburger menu */
    .mobile-menu-btn {
        display: none !important;
    }
    
    /* Nav - pokaż tylko produkty, uslugi, kontakt */
    .nav {
        display: none;
    }
    
    .about-image {
        display: none !important;
    }
    
    /* Fix overflow - najważniejsze! */
    *, *::before, *::after {
        max-width: 100% !important;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    html, body {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Container */
    .container {
        padding: 0 16px;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Hero */
    .hero .container {
        max-width: 100% !important;
        width: 100% !important;
        grid-template-columns: 1fr;
    }
    
    /* Hero content text */
    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .hero-title, .hero-subtitle {
        max-width: 100% !important;
        width: 100% !important;
        word-wrap: break-word;
    }
    
    /* Header */
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .logo img, .logo-icon {
        max-width: 100px !important;
        width: auto !important;
        height: auto !important;
    }
    
    /* Nav */
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Hero */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 28px;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 16px;
        text-align: center;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .hero-stats .stat {
        text-align: center;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-text {
        text-align: center;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    /* Certyfikaty */
    .certyfikaty-grid {
        grid-template-columns: 1fr;
    }
    
    .galeria-grid {
        grid-template-columns: 1fr;
    }
    
    .certyfikat-card {
        padding: 24px 20px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card {
        padding: 20px;
    }
    
    /* Services */
    .services-list {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .service-item {
        padding: 24px 20px;
        width: 100%;
    }
    
    .service-number {
        font-size: 36px !important;
        min-width: 50px;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-left {
        order: 2;
    }
    
    .contact-form {
        order: 1;
        padding: 20px;
    }
    
    .contact-form .form input,
    .contact-form .form textarea {
        width: 100%;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-contact {
        text-align: center;
    }
    
    /* Section titles */
    .section-title {
        font-size: 26px;
        text-align: center;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
}

/* ========================================
   Animations
   ======================================== */

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

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.product-card,
.service-item {
    animation: fadeInUp 0.6s ease backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
