
/* =========================================
   ARTSITES CNC – PROGRAMOWANIE CNC
   ========================================= */

.programming-page {
    --cnc-blue: #1769e0;
    --cnc-blue-light: #36a5ff;
    --cnc-navy: #071a30;
    --cnc-navy-light: #102b49;
    --cnc-text: #142238;
    --cnc-muted: #63748a;
    --cnc-border: #dce5ef;
    --cnc-light: #f3f7fc;

    margin: 0;
    color: var(--cnc-light);
    background: #fff;
    font-family: 'Inter', Arial, sans-serif;
    overflow-x: hidden;
}

.programming-page *,
.programming-page *::before,
.programming-page *::after {
    box-sizing: border-box;
}

.programming-container {
    width: min(1200px, calc(100% - 48px));
    margin-inline: auto;
}

.programming-page a {
    text-decoration: none;
    color: inherit;
}

.programming-page img {
    display: block;
    max-width: 100%;
}


/* HEADER */

.programming-header {
    position: relative;
    z-index: 20;
    background: var(--cnc-navy);
    color: #fff;
}

.programming-header-inner {
    width: min(1320px, calc(100% - 48px));
    min-height: 76px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.programming-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff !important;
    font-size: clamp(20px, 2vw, 27px);
    font-weight: 800;
    white-space: nowrap;
}

.programming-logo strong {
    color: var(--cnc-blue-light);
}

.logo-symbol {
    color: var(--cnc-blue-light);
    font-size: clamp(28px, 3vw, 38px);
}

.programming-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(12px, 2vw, 27px);
}

.programming-nav a {
    position: relative;
    padding: 28px 0;
    color: #e2eaf4;
    font-size: clamp(12px, 1.1vw, 14px);
    font-weight: 600;
    transition: color .2s ease;
}

.programming-nav a:hover,
.programming-nav a.active {
    color: #fff;
}

.programming-nav a.active::after {
    content: "";
    position: absolute;
    bottom: 17px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--cnc-blue-light);
    border-radius: 4px;
}

.mobile-menu-button,
.mobile-menu {
    display: none;
}


/* HERO */

.programming-hero {
    position: relative;
    min-height: clamp(370px, 39vw, 500px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--cnc-navy);
    color: #fff;
}

.programming-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            90deg,
            rgba(5, 20, 38, .98) 0%,
            rgba(5, 20, 38, .88) 35%,
            rgba(5, 20, 38, .35) 70%,
            rgba(5, 20, 38, .12) 100%
        );
}

.hero-image {
    position: absolute;
    inset: 0;
    background-image: url("../img/programowanie-hero.jpg");
    background-size: cover;
    background-position: center 48%;
    opacity: .9;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-block: clamp(55px, 7vw, 90px);
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--cnc-blue-light);
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 800;
    letter-spacing: 2px;
}

.hero-eyebrow span {
    width: 28px;
    height: 2px;
    background: var(--cnc-blue-light);
}

.programming-hero h1 {
    max-width: 750px;
    margin: 18px 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -2px;
}

.programming-hero h1 span {
    color: var(--cnc-blue-light);
}

.hero-description {
    max-width: 610px;
    margin: 0;
    color: #e0e9f4;
    font-size: clamp(14px, 1.4vw, 18px);
    line-height: 1.75;
}

.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(18px, 3vw, 36px);
    margin-top: 35px;
}

.hero-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: clamp(11px, 1.1vw, 14px);
    font-weight: 600;
    line-height: 1.4;
}

.benefit-icon {
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(23, 105, 224, .2);
    border: 1px solid rgba(75, 166, 255, .4);
    color: var(--cnc-blue-light);
    font-size: 22px;
    font-weight: 700;
}


/* SECTION HEADINGS */

.section-heading {
    max-width: 720px;
    margin: 0 auto 42px;
    text-align: center;
}

.section-heading h2,
.articles-heading h2 {
    margin: 12px 0;
    color: var(--cnc-navy);
    font-size: clamp(25px, 3.2vw, 38px);
    line-height: 1.2;
    letter-spacing: -.8px;
}

.section-heading p,
.articles-heading p {
    margin: 0;
    color: var(--cnc-muted);
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.7;
}


/* TOPICS */

.programming-topics {
    padding-block: clamp(55px, 7vw, 85px);
    background: var(--cnc-light);
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 17px;
}

.topic-card {
    min-height: 260px;
    padding: clamp(18px, 2vw, 26px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--cnc-border);
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(20, 48, 80, .045);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.topic-card[href]:hover {
    transform: translateY(-5px);
    border-color: #9dc5f7;
    box-shadow: 0 12px 30px rgba(20, 48, 80, .1);
}

.topic-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eaf3ff;
    color: var(--cnc-blue);
    font-size: 27px;
    font-weight: 800;
}

.topic-card h3 {
    margin: 0 0 10px;
    color: var(--cnc-navy);
    font-size: clamp(15px, 1.35vw, 18px);
    line-height: 1.3;
}

.topic-card p {
    margin: 0;
    color: var(--cnc-muted);
    font-size: clamp(12px, 1.05vw, 14px);
    line-height: 1.65;
}

.topic-link,
.topic-status {
    margin-top: auto;
    padding-top: 20px;
    color: var(--cnc-blue);
    font-size: 12px;
    font-weight: 800;
}

.topic-status {
    color: #8795a7;
    font-weight: 600;
}


/* FEATURED ARTICLE */

.featured-section {
    padding-block: clamp(45px, 6vw, 70px);
    background: #fff;
}

.featured-article {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    overflow: hidden;
    border-radius: 18px;
    background: var(--cnc-navy);
    color: #fff;
    box-shadow: 0 14px 35px rgba(8, 29, 54, .12);
}

.featured-image {
    min-height: 300px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
}

.featured-content {
    padding: clamp(28px, 4vw, 55px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.featured-label {
    color: var(--cnc-blue-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.featured-content h2 {
    margin: 15px 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.2;
}

.featured-content p {
    max-width: 600px;
    margin: 0 0 25px;
    color: #d8e4f1;
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.7;
}

.primary-button {
    min-height: 48px;
    padding: 12px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: 8px;
    background: var(--cnc-blue);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.primary-button:hover {
    background: #0e56c0;
    transform: translateY(-2px);
}


/* ARTICLE GRID */

.programming-articles {
    padding-block: clamp(50px, 7vw, 85px);
    background: var(--cnc-light);
}

.articles-heading {
    margin-bottom: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.articles-heading h2 {
    margin-top: 10px;
}

.all-articles-link {
    flex-shrink: 0;
    padding-bottom: 8px;
    color: var(--cnc-blue) !important;
    font-size: 13px;
    font-weight: 800;
}

.programming-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.programming-article-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cnc-border);
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(20, 48, 80, .045);
    transition: transform .25s ease, box-shadow .25s ease;
}

.programming-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 48, 80, .1);
}

.article-card-image {
    height: clamp(150px, 17vw, 205px);
    overflow: hidden;
    display: block;
    background: #dce7f3;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.programming-article-card:hover .article-card-image img {
    transform: scale(1.04);
}

.article-card-content {
    padding: 22px;
}

.article-category {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 5px;
    background: #eaf3ff;
    color: var(--cnc-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
}

.article-card-content h3 {
    margin: 0 0 12px;
    color: var(--cnc-navy);
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.35;
}

.article-card-content h3 a:hover {
    color: var(--cnc-blue);
}

.article-card-content p {
    margin: 0 0 18px;
    color: var(--cnc-muted);
    font-size: clamp(12px, 1.05vw, 14px);
    line-height: 1.65;
}

.article-read-more {
    color: var(--cnc-blue) !important;
    font-size: 12px;
    font-weight: 800;
}

.article-coming-label {
    color: #8795a7;
    font-size: 12px;
    font-weight: 700;
}

.coordinates-image {
    position: relative;
    background:
        linear-gradient(135deg, #dce9f8, #f8fbff);
}

.axis {
    position: absolute;
    font-size: clamp(25px, 3vw, 40px);
    font-weight: 800;
}

.axis-x {
    right: 22%;
    bottom: 20%;
    color: #e54b4b;
}

.axis-y {
    right: 42%;
    top: 20%;
    color: #1c9a62;
}

.axis-z {
    left: 24%;
    top: 25%;
    color: var(--cnc-blue);
}

.axis-origin {
    position: absolute;
    left: 48%;
    top: 48%;
    color: var(--cnc-navy);
    font-size: 20px;
    font-weight: 800;
}


/* PROMO */

.programming-promo {
    padding-block: clamp(50px, 7vw, 85px);
    background: #fff;
}

.programming-promo .programming-container {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    align-items: center;
    gap: clamp(30px, 5vw, 65px);
}

.promo-image {
    min-height: 350px;
    overflow: hidden;
    border-radius: 15px;
}

.promo-image img {
    width: 100%;
    height: 100%;
    min-height: 350px;
    object-fit: cover;
}

.promo-content h2 {
    margin: 12px 0;
    color: var(--cnc-navy);
    font-size: clamp(25px, 3vw, 36px);
    line-height: 1.2;
}

.promo-content > p {
    color: var(--cnc-muted);
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.75;
}

.promo-list {
    margin: 24px 0 28px;
    padding: 0;
    display: grid;
    gap: 14px;
    list-style: none;
}

.promo-list li {
    position: relative;
    padding-left: 32px;
    color: var(--cnc-text);
    font-size: clamp(12px, 1.1vw, 15px);
    line-height: 1.5;
}

.promo-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    background: var(--cnc-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}


/* TOOLS */

.programming-tools {
    padding-block: clamp(50px, 7vw, 80px);
    background: var(--cnc-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tool-card {
    min-height: 105px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--cnc-border);
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s ease, transform .2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: #9dc5f7;
}

.tool-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eaf3ff;
    color: var(--cnc-blue);
    font-size: 24px;
}

.tool-card strong,
.tool-card small {
    display: block;
}

.tool-card strong {
    margin-bottom: 5px;
    color: var(--cnc-navy);
    font-size: 13px;
}

.tool-card small {
    color: var(--cnc-muted);
    font-size: 11px;
    line-height: 1.5;
}

.tool-arrow {
    margin-left: auto;
    color: var(--cnc-blue);
    font-size: 21px;
    font-weight: 700;
}


/* FOOTER */

.programming-footer {
    padding-block: 27px;
    background: var(--cnc-navy);
    color: #d8e4f1;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner p {
    margin: 0;
    color: #b6c7d9;
    font-size: clamp(10px, 1vw, 12px);
    text-align: center;
}

.footer-inner > a:last-child {
    color: var(--cnc-blue-light);
    font-size: 12px;
    font-weight: 700;
}


/* TABLET */

@media (max-width: 1000px) {

    .programming-nav {
        gap: 13px;
    }

    .programming-nav a {
        font-size: 11px;
    }

    .topics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .topic-card {
        min-height: 235px;
    }
}


/* MOBILE */

@media (max-width: 760px) {

    .programming-container {
        width: min(100% - 32px, 600px);
    }

    .programming-header-inner {
        width: calc(100% - 32px);
        min-height: 65px;
    }

    .programming-nav {
        display: none;
    }

    .mobile-menu-button {
        width: 42px;
        height: 42px;
        padding: 9px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        border: 1px solid rgba(255,255,255,.2);
        border-radius: 8px;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-button span {
        width: 100%;
        height: 2px;
        display: block;
        background: #fff;
        border-radius: 3px;
        transition: transform .2s ease, opacity .2s ease;
    }

    .mobile-menu-button.menu-active span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-button.menu-active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-button.menu-active span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-menu.menu-open {
        display: grid;
        padding: 8px 16px 18px;
        background: var(--cnc-navy-light);
    }

    .mobile-menu a {
        padding: 13px 10px;
        border-bottom: 1px solid rgba(255,255,255,.1);
        color: #fff;
        font-size: 14px;
    }

    .programming-hero {
        min-height: 480px;
        align-items: flex-end;
    }

    .programming-hero::after {
        background:
            linear-gradient(
                0deg,
                rgba(5, 20, 38, .98) 0%,
                rgba(5, 20, 38, .88) 48%,
                rgba(5, 20, 38, .28) 100%
            );
    }

    .hero-image {
        background-position: 60% center;
    }

    .hero-content {
        padding-block: 55px 38px;
    }

    .programming-hero h1 {
        font-size: clamp(34px, 9vw, 48px);
        letter-spacing: -1.5px;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.65;
    }

    .hero-benefits {
        gap: 16px;
        margin-top: 25px;
    }

    .hero-benefit {
        font-size: 11px;
    }

    .benefit-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 18px;
    }

    .topics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .topic-card {
        min-height: 235px;
        padding: 17px;
    }

    .topic-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 15px;
        font-size: 22px;
    }

    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-image,
    .featured-image img {
        min-height: 210px;
        max-height: 260px;
    }

    .featured-content {
        padding: 26px 22px 30px;
    }

    .articles-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .programming-article-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .article-card-image {
        height: 210px;
    }

    .article-card-content {
        padding: 19px;
    }

    .programming-promo .programming-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .promo-image,
    .promo-image img {
        min-height: 220px;
        max-height: 280px;
    }

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

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

}


/* SMALL MOBILE */

@media (max-width: 420px) {

    .programming-container {
        width: calc(100% - 26px);
    }

    .programming-hero {
        min-height: 500px;
    }

    .hero-benefits {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-benefit:last-child {
        grid-column: 1 / -1;
    }

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

    .topic-card {
        min-height: auto;
    }

    .topic-link,
    .topic-status {
        padding-top: 14px;
    }

    .article-card-image {
        height: 185px;
    }

    .featured-content h2 {
        font-size: 24px;
    }

}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .programming-page *,
    .programming-page *::before,
    .programming-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

}
