/*
Theme Name: CMU Theme
Theme URI: 
Description: Nowy motyw CMU w oparciu o projekt Figma, z klasycznymi szablonami PHP.
Author: Antigravity
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --cmu-green: #74C333;
    --cmu-green-hover: #5DA726;
    --cmu-dark: #3a3a3a;
    --cmu-dark-bg: #414141;
    --cmu-grey-bg: #F0F2F5;
    --cmu-text: #2f2f2f;
    --cmu-light-text: #ffffff;
    --font-base: 'Inter', -apple-system, sans-serif;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-base);
    margin: 0;
    padding: 0;
    color: var(--cmu-text);
    overflow-x: hidden;
    background-color: #ffffff;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 700;
    color: var(--cmu-dark);
}

h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

/* Utilities */
.cmu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--cmu-light-text);
}

.text-green {
    color: var(--cmu-green);
}

.text-grey {
    color: #888;
}

.font-normal {
    font-weight: 400;
}

.font-bold {
    font-weight: 700;
}

.bg-dark {
    background-color: var(--cmu-dark);
    color: #fff;
}

.bg-dark h2,
.bg-dark h3 {
    color: #fff;
}

.light-bg {
    background-color: var(--cmu-grey-bg);
}

.section-padding {
    padding: 80px 0;
}

.relative {
    position: relative;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mt-60 {
    margin-top: 60px;
}

.mt-80 {
    margin-top: 80px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mr-20 {
    margin-right: 20px;
}

.divider-green {
    height: 4px;
    width: 60px;
    background-color: var(--cmu-green);
    margin: 15px 0;
}

.center-divider {
    margin: 15px auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--cmu-green);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--cmu-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 195, 51, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--cmu-text);
    border: 2px solid var(--cmu-dark);
}

.btn-outline:hover {
    background-color: var(--cmu-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* Header */
.site-header {
    background-color: var(--cmu-darker, #2B2B2B);
    color: #fff;
    padding: 15px 0;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    height: 40px;
}

.fallback-menu,
.main-navigation ul {
    display: flex;
    gap: 30px;
}

.main-navigation a {
    font-weight: 500;
    font-size: 15px;
}

.main-navigation a:hover {
    color: var(--cmu-green);
}

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

.action-icon {
    color: #fff;
    font-size: 18px;
}

.action-icon:hover {
    color: var(--cmu-green);
}

/* Hero Section */
.hero-section {
    background: url('assets/img/hero-bg.jpg') center/cover no-repeat;
    background-color: var(--cmu-dark);
    /* fallback */
    color: #fff;
    padding: 150px 0;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h1 {
    color: #fff;
    font-size: 48px;
    line-height: 1.2;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-subtitle {
    font-weight: 800;
    font-size: 18px;
    color: var(--cmu-dark);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

.section-subtitle::after {
    content: '';
    display: block;
    height: 3px;
    width: 40px;
    background: var(--cmu-green);
    margin-top: 5px;
}

.blob-img {
    border-radius: 40px 150px 40px 150px;
    width: 100%;
    height: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Maszyna Miesiaca */
/* Maszyna Miesiąca - Naprawa układu */
.machine-of-month-container {
    background-color: #4d4d4d;
    /* Ciemniejszy szary tła zewnętrznego */
    padding: 60px 20px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mom-card {
    display: flex;
    width: 100%;
    max-width: 900px;
    background-color: #3a3a3a;
    /* Kolor tła panelu z tekstem */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mom-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mom-content h3 {
    color: #fff;
    font-size: 36px;
    line-height: 1;
    margin-bottom: 10px;
    font-weight: 800;
}

.mom-name {
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 30px;
}

.mom-price {
    color: #fff;
    font-size: 22px;
}

.mom-image {
    flex: 1.2;
}

.mom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mom-action {
    margin-top: 30px;
}

.mom-action .btn-primary {
    padding: 15px 45px;
    font-size: 16px;
    text-transform: none;
    border-radius: 30px;
}

/* Responsywność */
@media (max-width: 768px) {
    .mom-card {
        flex-direction: column;
    }

    .mom-content {
        text-align: center;
        padding: 30px;
    }

    .mom-image {
        height: 250px;
    }
}

/* How it works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.step-item {
    background: transparent;
}

.step-icon {
    width: 80px;
    height: 80px;
    border: 2px solid var(--cmu-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
    color: var(--cmu-dark);
}

.step-icon.text-green {
    border-color: var(--cmu-green);
    color: #fff;
    background: var(--cmu-green);
}

.step-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.step-item p {
    font-size: 14px;
    color: #666;
}

/* Trade in */
.trade-in-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.rounded-img {
    border-radius: 12px;
    width: 100%;
}

/* Financing */
.financing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.financing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.feature-box {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-box.light {
    background-color: #f7f7f7;
    color: var(--cmu-dark);
}

.feature-box.dark {
    background-color: var(--cmu-dark);
    color: #fff;
}

.feature-box i {
    font-size: 32px;
    margin-bottom: 15px;
}

.feature-box p {
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Categories */
.categories-bg {
    background-color: var(--cmu-dark-bg);
}

.machine-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.category-btn {
    border-color: #555;
    color: #fff;
    justify-content: center;
}

.category-btn:hover {
    border-color: var(--cmu-green);
    background-color: transparent;
    color: var(--cmu-green);
}

/* Contact Form Section */
.flex-center {
    display: flex;
    justify-content: center;
}

.form-wrapper {
    width: 100%;
    max-width: 650px;
}

.btn-white {
    background-color: #fff;
    color: var(--cmu-dark);
    border-radius: 4px;
    border: none;
    font-weight: 700;
    padding: 15px 40px;
}

.btn-white:hover {
    background-color: #f0f0f0;
}

.btn-phone i {
    margin-right: 10px;
}

.cmu-contact-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.cmu-contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #fff;
}

.cmu-contact-form input,
.cmu-contact-form textarea {
    width: 100%;
    padding: 14px;
    border-radius: 6px;
    border: none;
    background: #fff;
    font-family: var(--font-base);
    font-size: 14px;
    color: var(--cmu-dark);
}

.cmu-contact-form input:focus,
.cmu-contact-form textarea:focus {
    outline: 2px solid var(--cmu-green);
}

.form-row.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Legal Text Checkboxes */
.form-legal {
    font-size: 11px;
    line-height: 1.5;
    color: #b0b0b0;
    text-align: left;
}

.gdpr-text {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
    padding-left: 25px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 1px;
    left: 0;
    height: 14px;
    width: 14px;
    background-color: #fff;
    border-radius: 2px;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--cmu-green);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.asterisk-info {
    margin-top: 15px;
}

/* Footer Extended */
.bg-dark-footer {
    background-color: #3f3f3f;
    border-top: 1px solid #4a4a4a;
    padding: 50px 0 30px 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid #555;
}

.footer-contact-info {
    display: flex;
    gap: 50px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

.contact-item i {
    font-size: 18px;
    margin-top: 2px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    font-size: 13px;
    color: #b0b0b0;
}

.footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.social-icon {
    color: var(--cmu-green);
    font-size: 22px;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* Archive Hero */
.archive-hero-section {
    background: url('assets/img/hero-bg.jpg') center/cover no-repeat;
    background-color: var(--cmu-dark);
    position: relative;
    padding: 100px 0 80px 0;
}

.archive-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.z-index-2 {
    position: relative;
    z-index: 2;
}

/* Grid fixes for Archive */
.machines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* New CMU Card */
.cmu-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cmu-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.cmu-card-image {
    width: 100%;
    height: 240px;
    background: #f0f0f0;
}

.cmu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cmu-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cmu-card-title {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-bottom: 5px;
}

.cmu-card-title a {
    color: inherit;
}

.cmu-card-title a:hover {
    color: var(--cmu-green);
}

.cmu-card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--cmu-dark);
    margin-bottom: 5px;
}

.cmu-card-category {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.cmu-card-specs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 25px;
    font-size: 12px;
    color: #888;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cmu-card-action {
    margin-top: auto;
    text-align: center;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Single Machine Layout */
.section-padding-small {
    padding: 40px 0;
}

.section-padding-medium {
    padding: 60px 0;
}

.pb-80 {
    padding-bottom: 80px;
}

.mt-15 {
    margin-top: 15px;
}

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

.rounded-img {
    border-radius: 12px;
}

.shadow-sm {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.text-xxl {
    font-size: 32px;
}

.text-dark {
    color: var(--cmu-dark);
}

.text-right {
    text-align: right;
}

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

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

.thumb-box {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    aspect-ratio: 1;
}

.thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-main-title {
    font-size: 28px;
    color: var(--cmu-dark);
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 700;
}

.single-sub-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--cmu-dark);
    margin-bottom: 30px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table td {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    color: #777;
    font-size: 15px;
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.single-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.highlight-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.highlight-box i {
    font-size: 36px;
    color: #555;
}

.hl-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.hl-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--cmu-dark);
}

/* Description Grid */
.desc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.formatted-content {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
}

.formatted-content p {
    margin-bottom: 20px;
}

/* Contact Box */
.contact-box-inner {
    padding: 50px;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item-inline {
    font-size: 16px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.contact-item-inline i {
    width: 20px;
    font-size: 18px;
}

@media (max-width: 991px) {
    .header-inner {
        flex-direction: column;
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .about-grid,
    .trade-in-grid,
    .financing-grid {
        grid-template-columns: 1fr;
    }

    .machine-of-month {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 30px;
    }

    .mom-image img {
        position: relative;
        right: 0;
        top: 0;
        height: auto;
        max-width: 100%;
        margin: 20px 0;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }

    .machines-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer & Form mobile */
    .form-row.two-cols {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .footer-contact-info {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    /* Single Mobile */
    .single-top-grid,
    .desc-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .single-actions {
        flex-direction: column;
        gap: 15px;
    }

    .single-actions .btn {
        width: 100%;
        margin-right: 0;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

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

    .financing-features {
        grid-template-columns: 1fr;
    }

    .machines-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Sekcja Kategorie (Nowy Styl) --- */

.categories-custom-bg {
    position: relative;
    background-image: url('https://cmu24.pl/wp-content/uploads/zdj.png');
    /* Możesz zmienić na konkretny URL traktora ze zdjęcia */
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    overflow: hidden;
}

/* Ciemna nakładka na tło */
.categories-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    /* Dostosuj stopień przyciemnienia */
    z-index: 1;
}

.text-light-grey {
    color: #cccccc;
    font-size: 18px;
}

/* Układ siatki przycisków */
.machine-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 kolumny */
    gap: 20px;
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

/* Styl przycisków (Pills) */
.category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    /* Bardzo delikatne tło */
    border: 2px solid var(--cmu-green);
    color: #ffffff !important;
    border-radius: 50px;
    /* Zaokrąglone rogi (pill shape) */
    padding: 16px 25px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 60px;
}

.category-btn:hover {
    background-color: var(--cmu-green);
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(116, 195, 51, 0.4);
}

/* Responsywność dla kategorii */
@media (max-width: 991px) {
    .machine-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 kolumny na tabletach */
    }
}

@media (max-width: 600px) {
    .machine-categories-grid {
        grid-template-columns: 1fr;
        /* 1 kolumna na komórkach */
        gap: 15px;
    }

    .category-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Zamiast .cmu-container flex-center w formularzu */
.row.justify-content-center {
    display: flex;
    justify-content: center;
}

/* Upewnij się, że maszyny i inne gridy nie wystają poza kontener */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

#searchCollapse {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    position: absolute;
    /* Opcjonalnie, jeśli ma nachodzić na treść */
    width: 100%;
    z-index: 1000;
}

.action-icon {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    margin-right: 15px;
}