/* =====================================================
   PORTFOLIO — archive & single project
   ===================================================== */

/* ---- CATEGORY FILTER TABS ---- */
ul.portfolio-filter {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    width: 100%;
    border-bottom: 1px solid #e4e4e4;
    background-color: #f7f7f7;
    border-radius: 5px 5px 0 0;
    display: flex;
}
ul.portfolio-filter li {
    flex: 1;
    position: relative;
    border-right: 1px solid #fff;
}
ul.portfolio-filter li:last-child {
    border-right: 0;
}
ul.portfolio-filter li a {
    color: #262626;
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 8px;
    width: 100%;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}
ul.portfolio-filter li a i {
    font-size: 2rem;
    flex-shrink: 0;
}
ul.portfolio-filter li a span {
    font-size: 1.1rem;
    line-height: 1;
    text-align: left;
}
ul.portfolio-filter li a:hover,
ul.portfolio-filter li a.active {
    background-color: #ED1C24;
    color: #fff;
    text-decoration: none;
}
ul.portfolio-filter li a::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ED1C24;
    opacity: 0;
    transition: opacity 0.2s ease;
}
ul.portfolio-filter li a:hover::after,
ul.portfolio-filter li a.active::after {
    opacity: 1;
}

/* ---- PORTFOLIO GRID ---- */
#portfolio-grid {
    list-style: none;
    margin: 0;
    padding: 0 30px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
#portfolio-grid li a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    text-decoration: none;
}
#portfolio-grid li a img {
    width: 100%;
    height: auto;
    display: block;
}
/* Hover overlay — archive grid + related projects */
#portfolio-grid li a .portfolio-overlay,
.rp-thumb .portfolio-overlay {
    visibility: hidden;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    line-height: 1.4;
    overflow: hidden;
    white-space: normal;
}
#portfolio-grid li a .portfolio-overlay.blue,
.rp-thumb .portfolio-overlay.blue  { background-color: rgba(0,174,239,0.95); }
#portfolio-grid li a .portfolio-overlay.red,
.rp-thumb .portfolio-overlay.red   { background-color: rgba(237,28,36,0.95); }
#portfolio-grid li a .portfolio-overlay.green,
.rp-thumb .portfolio-overlay.green { background-color: rgba(11,148,68,0.95); }
#portfolio-grid li a:hover .portfolio-overlay,
.rp-thumb:hover .portfolio-overlay {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}
#portfolio-grid li a .portfolio-overlay h2,
.rp-thumb .portfolio-overlay h2 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0 8px;
    color: #fff;
}
#portfolio-grid li a .portfolio-overlay p,
.rp-thumb .portfolio-overlay p {
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}
#portfolio-grid li a:hover .portfolio-overlay p,
.rp-thumb:hover .portfolio-overlay p {
    opacity: 1;
    transform: translateY(0);
}

/* ---- PAGINATION ---- */
.portfolio-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
}
.portfolio-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #262626;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.portfolio-pagination .page-numbers:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    color: #ED1C24;
}
.portfolio-pagination .page-numbers.current {
    background-color: #ED1C24;
    border-color: #ED1C24;
    color: #fff;
    cursor: default;
}
.portfolio-pagination .page-numbers.dots {
    border-color: transparent;
    background: none;
    cursor: default;
}
.portfolio-pagination .page-numbers.prev,
.portfolio-pagination .page-numbers.next {
    font-size: 0.4rem;
}

/* ---- RESPONSIVE (ARCHIVE) ---- */
@media (max-width: 1280px) {
    #portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    #portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    ul.portfolio-filter li a { gap: 6px; padding: 8px 4px; }
    ul.portfolio-filter li a i { font-size: 1.4rem; }
    ul.portfolio-filter li a span { font-size: 0.9rem; }
}
@media (max-width: 480px) {
    #portfolio-grid { grid-template-columns: 1fr; }
    ul.portfolio-filter { height: auto; flex-wrap: wrap; }
    ul.portfolio-filter li { flex: 0 0 33.333%; border-bottom: 1px solid #fff; }
}


/* =====================================================
   SINGLE PROJECT PAGE
   ===================================================== */

.single-project {
    padding: 4rem 0 6rem;
}

/* Two-column layout */
.single-project__layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}


.single-project__info {
    flex: 0 0 30%;
    min-width: 0;
}

.single-project__title {
    font-weight: lighter;
    font-size: 3em;
    margin-bottom: 0;
    padding-bottom: 0;
    line-height: 1;
}

.single-project__category {
    margin-top: 0;
    padding-top: 0;
    font-size: 2.5em;
    line-height: 1;
}

.single-project__category a {
    font-weight: lighter;
    text-transform: lowercase;
    color: #ED1C24;    
    line-height: 1;
    text-decoration: none;
}

.single-project__divider {
    border: 0;
    border-top: 1px solid #e4e4e4;
    margin: 10px 0;
}

.single-project__box {
    margin-bottom: 20px;
}
.single-project__box-title {
    font-size: 1.8em;
    font-weight: lighter;
    position: relative;
    border-bottom: 1px solid #f4f4f4;
    padding: 0 0 15px 0;
    margin: 0;
}
.single-project__box-title i {
    font-size: 1.8em;
    color: #ED1C24;
    position: relative;
    padding: 0 10px;
    top: 8px;
}
.single-project__box-body {
    padding: 15px 0;
    text-align: justify;
    font-size: 1.3em;
}

.single-project__tags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-bottom: 35px;
}
.single-project__tag {
    display: block;
    padding: 6px;
    background: #262626;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
    text-decoration: none;
    transition: background 0.2s;
    text-align: center;
}
.single-project__tag:hover {
    background: #ED1C24;
    color: #fff;
    text-decoration: none;
}
.single-project__box .show_online{
    font-size: 1em;
    line-height: 1.2;
    font-weight: lighter;
    color: #262626;
    border: 1px solid #f4f4f4;
    padding: 12px 0;
    transition: all 0.2s ease-in;
    width: 100%;
    display: block;
    text-align: center;
    background-color: #f7f7f7;
    text-decoration: none;
}
.single-project__box .show_online:hover{
    background-color: #ED1C24;
    color: #fff;
}

.single-project__back a {
    font-size: 1.6em;
    color: #262626;
    text-decoration: none;
    transition: color 0.2s;
    background-color: #f7f7f7;
    width: 100%;
    padding: 6px 0;
    text-align: center;
    display: block;
}
.single-project__back a:hover { background-color: #ED1C24; color: #fff;}
.single-project__back a i { margin-right: 6px; }

/* ---- RIGHT: Gallery carousel ---- */
.single-project__gallery {
    flex: 1;
    min-width: 0;
    position: sticky;
    top: 20px;
}

/* Main image */
.spg-main {
    position: relative;
    background: #f5f5f5;
    overflow: hidden;
    line-height: 0;
}
.spg-main__link {
    display: block;
    position: relative;
    cursor: zoom-in;
}
.spg-main__img {
    width: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}
.spg-main__link:hover .spg-main__img {
    transform: scale(1.03);
}
.spg-main__zoom {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.spg-main__link:hover .spg-main__zoom { opacity: 1; }

/* Prev/next arrows */
.spg-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.spg-nav:hover { background: #ED1C24; }
.spg-nav--prev { left: 0; }
.spg-nav--next { right: 0; }

/* Thumbnails strip */
.spg-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.spg-thumb {
    flex: 0 0 calc(20% - 5px);
    padding: 0;
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}
.spg-thumb img {
    width: 100%;
    height: 58px;
    object-fit: cover;
    display: block;
}
.spg-thumb.active,
.spg-thumb:hover {
    border-color: #ED1C24;
}

/* ---- LIGHTBOX ---- */
.spg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.spg-lightbox.open {
    display: flex;
}
.spg-lightbox__wrap {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.spg-lightbox__img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    user-select: none;
}
.spg-lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.spg-lightbox__close:hover { color: #ED1C24; }
.spg-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 3rem;
    width: 52px;
    height: 52px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.spg-lightbox__nav:hover { background: #ED1C24; }
.spg-lightbox__nav--prev { left: 16px; }
.spg-lightbox__nav--next { right: 16px; }
.spg-lightbox__counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 1.3rem;
}

/* ---- RELATED PROJECTS ---- */
.related-projects {
    background: #f7f7f7;
    padding: 5rem 0;
}
.related-projects__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 0 30px;
}
.related-projects__item a {
    display: block;
    text-decoration: none;
    color: #262626;
    overflow: hidden;
}
.related-projects__item a {
    display: block;
    text-decoration: none;
    color: #262626;
}
.related-projects__item .rp-thumb {
    position: relative;
    overflow: hidden;
    line-height: 0;
}
.related-projects__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* ---- RESPONSIVE (SINGLE) ---- */
@media (max-width: 1280px) {
    .related-projects__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    .single-project__layout { flex-direction: column; }
    .single-project__info { flex: none; width: 100%; }
    .single-project__gallery { position: static; width: 100%; }
    .related-projects__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .spg-main__img { height: 250px; }
    .spg-thumb { flex: 0 0 calc(25% - 5px); }
    .spg-thumb img { height: 48px; }
    .related-projects__grid { grid-template-columns: 1fr 1fr; padding: 0 15px; }
}


/* =====================================================
   TECHNOLOGY TAXONOMY PAGE  (/technologie/<slug>/)
   ===================================================== */

/* ---- PAGE WRAPPER ---- */
.tech-wrap {
    padding: 50px 0 60px;
    background: #f7f7f7;
}

/* ---- TWO-COLUMN LAYOUT ---- */
.tech-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    align-items: start;
}

/* ---- MAIN COLUMN ---- */
.tech-main {
    min-width: 0;
}

/* ---- HERO ---- */
.tech-hero {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 40px 30px 36px;
    margin-bottom: 30px;
}

.tech-hero__badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 3px;
    color: #fff;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.tech-hero__title {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 5em;
    font-weight: 300;
    color: #262626;
    margin: 0 0 14px;
    line-height: 1.1;
}

.tech-hero__accent {
    display: block;
    width: 80px;
    height: 2px;
    background: #ED1C24;
    margin: 0 0 22px;
}

.tech-hero__accent--left {
    margin: 0 0 24px;
}

.tech-hero__desc {
    font-size: 1.5em;
    font-weight: 300;
    color: #666;
    line-height: 1.65;
    margin: 0 0 18px;
}

.tech-hero__meta {
    font-size: 1.3em;
    color: #b3b3b3;
    margin: 0;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.tech-hero__meta strong {
    color: #ED1C24;
    font-weight: 700;
}

/* ---- PROJECTS ---- */
.tech-projects {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    padding: 30px 0 10px;
    overflow: hidden;
}

.tech-projects__heading {
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 3.2em;
    font-weight: 300;
    color: #262626;
    margin: 0 0 12px;
    padding: 0 30px;
}

.tech-projects #portfolio-grid {
    margin-top: 24px;
}

.tech-projects__empty {
    text-align: center;
    padding: 4rem 0;
    color: #b3b3b3;
    font-size: 1.5em;
}

/* ---- SIDEBAR ---- */
.tech-sidebar {
    position: sticky;
    top: 20px;
}

.tech-sidebar__inner {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    overflow: hidden;
}

.tech-sidebar__heading {
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b3b3b3;
    margin: 0;
    padding: 14px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.tech-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tech-sidebar__item {
    border-bottom: 1px solid #f0f0f0;
}

.tech-sidebar__item:last-child {
    border-bottom: 0;
}

.tech-sidebar__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 18px;
    text-decoration: none;
    color: #262626;
    transition: background 0.2s ease, color 0.2s ease;
}

.tech-sidebar__link:hover {
    background: rgba(237, 28, 36, 0.05);
    color: #ED1C24;
    text-decoration: none;
}

.tech-sidebar__dot {
    flex-shrink: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: block;
}

.tech-sidebar__name {
    flex: 1;
    font-size: 1.35em;
    font-weight: 400;
    line-height: 1.2;
}

.tech-sidebar__count {
    flex-shrink: 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #b3b3b3;
    background: #f7f7f7;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 26px;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.tech-sidebar__link:hover .tech-sidebar__count {
    background: rgba(237, 28, 36, 0.08);
    color: #ED1C24;
}

/* ---- TECH PAGE RESPONSIVE ---- */
@media (max-width: 991px) {
    .tech-layout {
        grid-template-columns: 1fr;
    }
    .tech-sidebar {
        position: static;
        order: -1;
    }
    .tech-sidebar__inner {
        border-radius: 6px;
    }
    .tech-sidebar__list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .tech-sidebar__item {
        border-right: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
    }
    .tech-hero__title { font-size: 3.8em; }
}

@media (max-width: 640px) {
    .tech-wrap { padding: 30px 0 40px; }
    .tech-hero { padding: 28px 20px 24px; }
    .tech-hero__title { font-size: 3em; }
    .tech-projects__heading { font-size: 2.6em; }
    .tech-sidebar__list { grid-template-columns: repeat(2, 1fr); }
}
