@import "cta-banner.css";
@import "footer.css";
@import "management.css";
@import "features.css";
@import "pricing.css";
@import "knowledge-base.css";
@import "articles-grid.css";
@import "wiki.css";

:root {
    --primary: #4C6B22;
    --secondary: #78A132;
    --dark: #1A1A1A;
    --light: #F4F7F0;
    --white: #FFFFFF;
    --text-gray: #666666;
    --accent-gold: #D4AF37;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

/* Header & Navigation */
.main-header {
    padding: 12px 0;
    position: fixed;
    width: 100%;
    max-width: 1240px;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: transparent;
    border-radius: 16px;
    box-shadow: none;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease, top 0.4s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--dark);
}

.logo i {
    font-size: 1.8rem;
}

.nav-desktop ul {
    display: flex;
    gap: 32px;
}

.nav-desktop ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-login {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

.text-highlight {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0) 100%), url("../img/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-wrapper {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 520px;
}

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

.btn-outline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background-color: var(--white);
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--primary);
    background-color: #F9F9F9;
}

.icon-play {
    width: 32px;
    height: 32px;
    border: 1px solid #E0E0E0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.8rem;
}

/* Hero Typography & Features Layout */
.hero-features-mini {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-item i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 4px;
}

.feature-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-features-mini {
        flex-direction: column;
        gap: 24px;
    }
}

/* Button Refinement & Icon Play */
.icon-play::before {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.btn-primary i:first-child {
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn-primary i:last-child {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.btn-primary:hover i:last-child {
    transform: translateX(4px);
}

.btn-outline {
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

/* Device Visuals Container */
.hero-visual {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.device-container {
    position: relative;
    width: 100%;
    max-width: 680px;
    perspective: 1000px;
}

.laptop-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.12));
    transition: transform 0.5s ease;
}

.phone-img {
    position: absolute;
    bottom: -30px;
    right: -10px;
    width: 28%;
    height: auto;
    z-index: 2;
    border-radius: 24px;
    border: 6px solid var(--dark);
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
    transition: transform 0.5s ease;
}

@media (max-width: 992px) {
    .hero-visual {
        justify-content: center;
        margin-top: 40px;
    }

    .device-container {
        max-width: 500px;
    }

    .phone-img {
        right: 0;
        bottom: -20px;
    }
}

/* Refined Device Positioning & Decorative Elements */
.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(76, 107, 34, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
}

.device-container:hover .laptop-img {
    transform: translateY(-10px) rotateX(2deg);
}

.device-container:hover .phone-img {
    transform: translateY(-15px) translateX(-5px);
}

@media (min-width: 1400px) {
    .phone-img {
        right: -40px;
        width: 30%;
    }
}

/* Benefits Section Styles */
.benefits-simple {
    padding: 40px 0 80px 0;
    background-color: var(--light);
}

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

.benefit-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.benefit-icon {
    width: 54px;
    height: 54px;
    background-color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.benefit-icon i {
    color: var(--primary);
    font-size: 1.4rem;
}

.benefit-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.benefit-text p {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Stats Bar Refinement */
.stats-bar {
    background: linear-gradient(90deg, #4C6B22 0%, #3D561B 100%);
    color: var(--white);
    padding: 60px 0;
    position: relative;
    z-index: 20;
    border-radius: 60px 60px 0 0;
    margin-top: -40px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.stat-icon i {
    font-size: 1.6rem;
    color: var(--white);
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        border-radius: 30px 30px 0 0;
        padding: 40px 0;
    }
}

/* Final RWD & Spacing Adjustments */
html {
    scroll-padding-top: 80px;
}

.hero-content {
    animation: fadeIn 1s ease-out;
}

.hero-visual {
    animation: fadeInRight 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero {
        padding: 160px 0 100px 0;
        background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0) 100%), url("../img/hero-bg.jpg");
        background-size: cover;
        background-position: center;
        position: relative;
        overflow: hidden;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-description {
        margin: 0 auto 30px auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-features-mini {
        display: none;
        /* Ukryte na tabletach/mobile, zastąpione przez benefits.php */
    }

    .benefits-simple {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-outline {
        justify-content: center;
        width: 100%;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}

/* Scroll Effect for Navigation */
.main-header.header-scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 10px 0;
    background-color: var(--white) !important;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(10px);
}


/** subpage */
/* Stylizacja dedykowana dla Hero Podstrony */
.subpage-hero {
    position: relative;
    padding: 140px 0 160px 0;
    background-color: #f3f5ee;
    background-image: url('../img/hero-subpage-bg.jpg');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: cover;
    overflow: hidden;
}

/* Nakładka tonalna / gradient, aby tekst po lewej stronie był w 100% czytelny */
.subpage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(243, 245, 238, 1) 0%,
            rgba(243, 245, 238, 0.95) 40%,
            rgba(243, 245, 238, 0.4) 70%,
            rgba(243, 245, 238, 0) 100%);
    z-index: 1;
}

/* Pozycjonowanie kontenera ponad nakładką */
.subpage-hero-container {
    position: relative;
    z-index: 5;
}

.subpage-hero-content {
    max-width: 620px;
    /* Blokada szerokości tekstu jak na wizualizacji */
}

/* --- Breadcrumbs --- */
.hero-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    color: #606b59;
    /* Przygaszona zieleń dla linków nieaktywnych */
    font-weight: 500;
}

.breadcrumb-item {
    transition: color 0.3s ease;
}

.breadcrumb-item.home-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item.home-icon i {
    font-size: 0.95rem;
}

.breadcrumb-item:hover {
    color: #1c3214;
}

.breadcrumb-separator {
    color: #a2b09b;
    font-size: 0.8rem;
}

.breadcrumb-item.active {
    color: #1c3214;
    /* Główny ciemny kolor tekstu dla aktywnej podstrony */
    font-weight: 600;
    cursor: default;
}

/* --- Typografia --- */
.subpage-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #112912;
    /* Głęboka, bardzo ciemna zieleń */
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.subpage-hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4e5949;
    /* Stonowany odcień tekstu opisu */
    margin-bottom: 40px;
}

/* --- Przyciski (Actions) --- */
.subpage-hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-hero-primary {
    background-color: #51792a;
    /* Wyrazista zieleń Agrai */
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(81, 121, 42, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-hero-primary:hover {
    background-color: #3e5d1f;
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background-color: transparent;
    color: #446327;
    border: 1px solid #ccd6c4;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn-hero-secondary:hover {
    background-color: rgba(81, 121, 42, 0.04);
    border-color: #446327;
}

/* --- Dolna Fala (Wave Divider) --- */
.hero-wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 10;
    transform: rotate(180deg);
    /* Odwrócenie, aby łuk wycinał dół sekcji */
}

.hero-wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
    /* Wysokość wygięcia łuku */
}

.hero-wave-divider .wave-fill {
    fill: #ffffff;
    /* Kolor fali dopasowany do tła kolejnej sekcji strony (biały) */
}

/* --- Responsywność (RWD) --- */
@media (max-width: 1024px) {
    .subpage-hero {
        background-position: 75% center;
        /* Przesunięcie punktu skupienia grafiki w tle */
        padding: 120px 0 140px 0;
    }

    .subpage-hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .subpage-hero {
        background-image: none;
        /* Ukrycie ciężkiego zdjęcia na mobile na rzecz czystego tła */
        padding: 100px 0 120px 0;
    }

    .subpage-hero::before {
        background: transparent;
        /* Wyłączenie zbędnego gradientu */
    }

    .subpage-hero-content {
        max-width: 100%;
    }

    .subpage-hero h1 {
        font-size: 2.4rem;
    }

    .subpage-hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        justify-content: center;
    }

    .hero-wave-divider svg {
        height: 40px;
        /* Zmniejszenie fali na urządzeniach mobilnych */
    }
}

/* Główna sekcja tła dla stron tekstowych */
.static-page-section {
    padding: 60px 0 120px 0;
    background-color: var(--white);
}

/* Główny kontener WYSIWYG z blokadą szerokości typograficznej */
.wysiwyg-content {
    max-width: 800px;
    margin: 0 auto;
    color: #2d382a;
    /* Ciemny, lekko organiczny odcień grafitu dla niemęczącego czytania */
    font-size: 1.05rem;
    line-height: 1.7;
    /* Zwiększona interlinia dla długich tekstów */
}

/* --- Nagłówki wewnątrz edytora --- */
.wysiwyg-content h1,
.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4 {
    color: #112912;
    /* Głęboka zieleń Agrai */
    font-weight: 800;
    line-height: 1.25;
    margin-top: 2.2rem;
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.wysiwyg-content h1 {
    font-size: 2.4rem;
}

.wysiwyg-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid #eef2ec;
    padding-bottom: 8px;
}

.wysiwyg-content h3 {
    font-size: 1.4rem;
    margin-top: 1.8rem;
}

.wysiwyg-content h4 {
    font-size: 1.15rem;
}

/* Reset marginesu dla pierwszego elementu, żeby nie robił dziury na górze */
.wysiwyg-content>*:first-child {
    margin-top: 0 !important;
}

/* --- Paragrafy i elementy tekstowe --- */
.wysiwyg-content p {
    margin-bottom: 1.4rem;
}

.wysiwyg-content strong {
    font-weight: 700;
    color: #112912;
}

.wysiwyg-content em {
    font-style: italic;
}

/* Linki wewnątrz tekstu */
.wysiwyg-content a {
    color: #51792a;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.wysiwyg-content a:hover {
    color: #3e5d1f;
    text-decoration: underline;
}

/* --- Listy numerowane i nienumerowane --- */
.wysiwyg-content ul,
.wysiwyg-content ol {
    margin-bottom: 1.6rem;
    padding-left: 24px;
}

.wysiwyg-content li {
    margin-bottom: 0.6rem;
}

/* Podkręcenie wyglądu wypunktowania ul */
.wysiwyg-content ul li {
    list-style-type: none;
    position: relative;
}

.wysiwyg-content ul li::before {
    content: "•";
    color: #51792a;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    position: absolute;
    left: 0;
}

.wysiwyg-content ol li {
    list-style-type: decimal;
}

/* Wygląd zagnieżdżonych list */
.wysiwyg-content ul ul,
.wysiwyg-content ol ol,
.wysiwyg-content ul ol,
.wysiwyg-content ol ul {
    margin-top: 0.6rem;
    margin-bottom: 0;
    padding-left: 20px;
}

/* --- Bloki cytatów / Wyróżnienia (Blockquote) --- */
.wysiwyg-content blockquote {
    background-color: #f7f9f5;
    border-left: 4px solid #51792a;
    padding: 20px 24px;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #445040;
}

.wysiwyg-content blockquote p:last-child {
    margin-bottom: 0;
}

/* --- Linie podziału (Horizontal Rule) --- */
.wysiwyg-content hr {
    border: 0;
    height: 1px;
    background: #e3e8e0;
    margin: 2.5rem 0;
}

/* --- Tabele z edytora (Pixel Perfect & Responsive) --- */
.wysiwyg-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    text-align: left;
}

.wysiwyg-content th {
    background-color: #f1f4ee;
    color: #112912;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 2px solid #ccd4c7;
}

.wysiwyg-content td {
    padding: 12px 16px;
    border-bottom: 1px solid #e3e8e0;
    color: #3b4738;
}

/* Efekt pasów zebra w tabeli */
.wysiwyg-content tr:nth-child(even) {
    background-color: #fafbfa;
}

.wysiwyg-content tr:hover td {
    background-color: #f4f6f2;
}

/* --- RWD (Responsywność) --- */
@media (max-width: 768px) {
    .static-page-section {
        padding: 40px 0 80px 0;
    }

    .wysiwyg-content {
        font-size: 1rem;
    }

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

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

    .wysiwyg-content h3 {
        font-size: 1.25rem;
    }

    /* Zabezpieczenie tabeli przed rozwaleniem layoutu na małych ekranach */
    .wysiwyg-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}