/* ==============================================
   CUSTOM CSS — Portfolio Landing Page
   All custom overrides and component styles
   ============================================== */

/* -----------------------------------------------
   MARKDOWN CONTENT STYLING — Agntix Light Theme
   Applies to .postbox-details-text (blog)
   and .tp-pd-2-overview-wrap (project)
----------------------------------------------- */
.postbox-details-text,
.tp-pd-2-overview-wrap {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.85;
    color: rgba(0,0,0,0.7);
    letter-spacing: -0.01em;
}
.postbox-details-text > p:first-of-type,
.tp-pd-2-overview-wrap > p:first-of-type {
    font-size: 18px;
    color: rgba(0,0,0,0.75);
    line-height: 1.8;
}
.postbox-details-text p,
.tp-pd-2-overview-wrap p {
    margin-top: 0;
    margin-bottom: 1.5em;
}
.postbox-details-text h1,
.postbox-details-text h2,
.postbox-details-text h3,
.postbox-details-text h4,
.tp-pd-2-overview-wrap h1,
.tp-pd-2-overview-wrap h2,
.tp-pd-2-overview-wrap h3,
.tp-pd-2-overview-wrap h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #141414;
    margin-top: 2.2em;
    margin-bottom: 0.5em;
    line-height: 1.2;
    letter-spacing: -0.03em;
}
.postbox-details-text h1, .tp-pd-2-overview-wrap h1 { font-size: 2em; }
.postbox-details-text h2, .tp-pd-2-overview-wrap h2 { font-size: 1.5em; }
.postbox-details-text h3, .tp-pd-2-overview-wrap h3 { font-size: 1.2em; }
.postbox-details-text h4, .tp-pd-2-overview-wrap h4 { font-size: 1.05em; }
.postbox-details-text strong, .tp-pd-2-overview-wrap strong { font-weight: 600; color: #141414; }
.postbox-details-text em, .tp-pd-2-overview-wrap em { font-style: italic; }
.postbox-details-text a,
.tp-pd-2-overview-wrap a {
    color: #141414;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(0,0,0,0.15);
    padding-bottom: 1px;
    transition: border-color 0.2s, background 0.2s;
}
.postbox-details-text a:hover,
.tp-pd-2-overview-wrap a:hover {
    border-color: #FFF669;
    background: #FFF669;
    color: #141414;
}
.postbox-details-text blockquote,
.tp-pd-2-overview-wrap blockquote {
    background: #F6F6F9;
    border-left: 3px solid #141414;
    border-radius: 0 12px 12px 0;
    margin: 2em 0;
    padding: 1.4em 1.8em;
    font-size: 1.05em;
    font-weight: 500;
    color: #141414;
    line-height: 1.7;
}
.postbox-details-text blockquote p,
.tp-pd-2-overview-wrap blockquote p { margin: 0; }
.postbox-details-text code,
.tp-pd-2-overview-wrap code {
    background: #F6F6F9;
    color: rgba(0,0,0,0.8);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85em;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    border: 1px solid rgba(0,0,0,0.06);
}
.postbox-details-text pre,
.tp-pd-2-overview-wrap pre {
    background: #F6F6F9;
    color: rgba(0,0,0,0.7);
    padding: 1.4em 1.8em;
    border-radius: 14px;
    overflow-x: auto;
    margin: 2em 0;
    font-size: 0.88em;
    line-height: 1.75;
    border: 1px solid rgba(0,0,0,0.06);
}
.postbox-details-text pre code,
.tp-pd-2-overview-wrap pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}
.postbox-details-text ul,
.postbox-details-text ol,
.tp-pd-2-overview-wrap ul,
.tp-pd-2-overview-wrap ol {
    padding-left: 1.5em !important;
    margin: 0 0 1.5em 0 !important;
    list-style: none !important;
}
.postbox-details-text ul ul,
.postbox-details-text ul ol,
.postbox-details-text ol ul,
.postbox-details-text ol ol,
.tp-pd-2-overview-wrap ul ul,
.tp-pd-2-overview-wrap ul ol,
.tp-pd-2-overview-wrap ol ul,
.tp-pd-2-overview-wrap ol ol {
    padding-left: 1.5em !important;
    margin-top: 0.4em !important;
    margin-bottom: 0.4em !important;
}
.postbox-details-text li,
.tp-pd-2-overview-wrap li {
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    color: rgba(0,0,0,0.7) !important;
    font-weight: 500 !important;
    border: none !important;
    border-bottom: none !important;
}
.postbox-details-text li > p,
.tp-pd-2-overview-wrap li > p,
.postbox-details-text li p,
.tp-pd-2-overview-wrap li p {
    margin: 0 !important;
    padding: 0 !important;
}
.postbox-details-text ul > li + li,
.postbox-details-text ol > li + li,
.tp-pd-2-overview-wrap ul > li + li,
.tp-pd-2-overview-wrap ol > li + li {
    margin-top: 0.4em !important;
}
.postbox-details-text ul > li,
.tp-pd-2-overview-wrap ul > li {
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.75em;
}
.postbox-details-text ul > li::before,
.tp-pd-2-overview-wrap ul > li::before {
    content: '';
    position: static;
    flex-shrink: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
}
.postbox-details-text ol,
.tp-pd-2-overview-wrap ol { counter-reset: ol-counter; }
.postbox-details-text ol > li,
.tp-pd-2-overview-wrap ol > li {
    counter-increment: ol-counter;
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.75em;
}
.postbox-details-text ol > li::before,
.tp-pd-2-overview-wrap ol > li::before {
    content: counter(ol-counter) '.';
    position: static;
    flex-shrink: 0;
    min-width: 1.6em;
    font-size: 0.9em;
    font-weight: 700;
    color: #141414;
    font-family: 'Inter', sans-serif;
}
.postbox-details-text hr,
.tp-pd-2-overview-wrap hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin: 2.5em 0;
}
.postbox-details-text ul hr,
.postbox-details-text ol hr,
.postbox-details-text li hr,
.tp-pd-2-overview-wrap ul hr,
.tp-pd-2-overview-wrap ol hr,
.tp-pd-2-overview-wrap li hr { display: none !important; }
.postbox-details-text img,
.tp-pd-2-overview-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 2em auto;
    display: block;
}
.postbox-details-text table,
.tp-pd-2-overview-wrap table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    font-size: 0.92em;
    font-family: 'Inter', sans-serif;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
}
.postbox-details-text thead tr,
.tp-pd-2-overview-wrap thead tr { background: #141414; }
.postbox-details-text th,
.tp-pd-2-overview-wrap th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFF669;
    white-space: nowrap;
}
.postbox-details-text thead tr th:first-child,
.tp-pd-2-overview-wrap thead tr th:first-child { border-radius: 14px 0 0 0; }
.postbox-details-text thead tr th:last-child,
.tp-pd-2-overview-wrap thead tr th:last-child { border-radius: 0 14px 0 0; }
.postbox-details-text td,
.tp-pd-2-overview-wrap td {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.7);
    vertical-align: top;
    font-weight: 500;
    background: #fff;
    transition: background 0.15s;
}
.postbox-details-text tbody tr:nth-child(even) td,
.tp-pd-2-overview-wrap tbody tr:nth-child(even) td { background: #F6F6F9; }
.postbox-details-text tbody tr:hover td,
.tp-pd-2-overview-wrap tbody tr:hover td { background: #ebebef; }
.postbox-details-text tbody tr:last-child td,
.tp-pd-2-overview-wrap tbody tr:last-child td { border-bottom: none; }
.postbox-details-text tbody tr:last-child td:first-child,
.tp-pd-2-overview-wrap tbody tr:last-child td:first-child { border-radius: 0 0 0 14px; }
.postbox-details-text tbody tr:last-child td:last-child,
.tp-pd-2-overview-wrap tbody tr:last-child td:last-child { border-radius: 0 0 14px 0; }
.postbox-details-text td:first-child,
.tp-pd-2-overview-wrap td:first-child { font-weight: 600; color: #141414; }

/* -----------------------------------------------
   HERO & FOOTER TITLE — Responsive fit
----------------------------------------------- */
.pp-hero-title {
    white-space: nowrap !important;
    display: block !important;
    font-size: min(380px, 11vw) !important;
    letter-spacing: 4px !important;
}
@media only screen and (max-width: 1599px) { .pp-hero-title { font-size: min(300px, 11vw) !important; } }
@media only screen and (max-width: 1399px) { .pp-hero-title { font-size: min(242px, 11vw) !important; } }
@media only screen and (max-width: 1199px) { .pp-hero-title { font-size: min(200px, 11vw) !important; } }
@media only screen and (max-width: 991px)  { .pp-hero-title { font-size: min(135px, 11vw) !important; } }
@media only screen and (max-width: 767px)  { .pp-hero-title { font-size: min(100px, 11vw) !important; letter-spacing: 2px !important; } }
@media only screen and (max-width: 575px)  { .pp-hero-title { font-size: min(65px, 11vw) !important; letter-spacing: 1px !important; } }

.pp-footer-title {
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: center !important;
    font-size: min(180px, 9vw) !important;
}
@media only screen and (max-width: 1199px) { .pp-footer-title { font-size: min(150px, 9vw) !important; } }
@media only screen and (max-width: 991px)  { .pp-footer-title { font-size: min(115px, 9vw) !important; } }
@media only screen and (max-width: 767px)  { .pp-footer-title { font-size: min(65px, 9vw) !important; } }
@media only screen and (max-width: 575px)  { .pp-footer-title { font-size: min(52px, 9vw) !important; } }

/* -----------------------------------------------
   MENU BUTTON — always BLACK, white on home hero
----------------------------------------------- */
.tp-header-14-bar-wrap .tp-header-8-bar,
.tp-header-inner-style .tp-header-14-bar-wrap .tp-header-8-bar,
.header-transparent .tp-header-14-bar-wrap .tp-header-8-bar,
.header-sticky .tp-header-14-bar-wrap .tp-header-8-bar,
.header-sticky.sticky-white-bg .tp-header-14-bar-wrap .tp-header-8-bar {
    background-color: transparent !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
}
.tp-header-14-bar-wrap .tp-header-8-bar span,
.tp-header-inner-style .tp-header-14-bar-wrap .tp-header-8-bar span,
.header-transparent .tp-header-14-bar-wrap .tp-header-8-bar span,
.header-sticky .tp-header-14-bar-wrap .tp-header-8-bar span,
.header-sticky.sticky-white-bg .tp-header-14-bar-wrap .tp-header-8-bar span {
    color: #141414 !important;
}
.tp-header-14-bar-wrap .tp-header-8-bar svg path,
.tp-header-inner-style .tp-header-14-bar-wrap .tp-header-8-bar svg path,
.header-transparent .tp-header-14-bar-wrap .tp-header-8-bar svg path,
.header-sticky .tp-header-14-bar-wrap .tp-header-8-bar svg path,
.header-sticky.sticky-white-bg .tp-header-14-bar-wrap .tp-header-8-bar svg path {
    fill: #141414 !important;
}
/* White on home page before scroll */
.page-home .header-transparent:not(.header-sticky) .tp-header-14-bar-wrap .tp-header-8-bar {
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}
.page-home .header-transparent:not(.header-sticky) .tp-header-14-bar-wrap .tp-header-8-bar span {
    color: #ffffff !important;
}
.page-home .header-transparent:not(.header-sticky) .tp-header-14-bar-wrap .tp-header-8-bar svg path {
    fill: #ffffff !important;
}

/* -----------------------------------------------
   VIDEO MODAL
----------------------------------------------- */
.video-play-btn {
    display: grid;
    height: 65px;
    width: 65px;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #000;
    border: none;
    cursor: pointer;
    animation: animate-pulse 3s linear infinite;
    transition: transform 0.3s;
}
.video-play-btn:hover { transform: scale(1.1); }
.video-play-btn span svg { transform: translateX(2px); }
.video-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.video-modal-overlay.active { display: flex; }
.video-modal-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
}
.video-modal-container {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.video-modal-landscape { width: 90vw; max-width: 960px; height: auto; aspect-ratio: 16/9; max-height: 80vh; }
.video-modal-portrait  { height: 95vh; width: auto; aspect-ratio: 9/16; max-width: 95vw; }
.video-modal-close {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.7);
    border: none; color: #fff;
    font-size: 32px; line-height: 1;
    cursor: pointer; z-index: 10;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.video-modal-close:hover { background: rgba(255,255,255,0.2); }
.video-modal-iframe { width: 100%; height: 100%; border: 0; }

/* -----------------------------------------------
   PHOTO LIGHTBOX
----------------------------------------------- */
.photo-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.photo-lightbox.active { display: flex; }
.photo-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.95); }
.photo-lightbox-content { position: relative; z-index: 1; max-width: 90vw; max-height: 85vh; }
.photo-lightbox-content img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.photo-lightbox-close {
    position: absolute; top: 20px; right: 20px; z-index: 2;
    background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 32px;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.photo-lightbox-close:hover { background: rgba(255,255,255,0.2); }
.photo-lightbox-prev, .photo-lightbox-next {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    background: rgba(0,0,0,0.5); border: none; color: #fff; font-size: 40px;
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.photo-lightbox-prev { left: 20px; }
.photo-lightbox-next { right: 20px; }
.photo-lightbox-prev:hover, .photo-lightbox-next:hover { background: rgba(255,255,255,0.2); }
.photo-lightbox-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2;
    color: #fff; font-size: 14px; background: rgba(0,0,0,0.5); padding: 4px 14px; border-radius: 20px;
}

/* -----------------------------------------------
   VIDEO GALLERY PAGE
----------------------------------------------- */
.video-gallery-card { margin-bottom: 40px; }
.video-gallery-thumb {
    position: relative; overflow: hidden;
    border-radius: 8px; background: #f3f4f6; cursor: pointer;
}
.video-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.video-gallery-card:hover .video-gallery-thumb img { transform: scale(1.05); }
.video-gallery-thumb .tp-blog-masonry-thumb-video { opacity: 0; transition: opacity 0.3s; }
.video-gallery-card:hover .tp-blog-masonry-thumb-video { opacity: 1; }
.video-gallery-content { padding: 14px 0; }
.video-gallery-title {
    font-size: 16px; font-weight: 600; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.video-gallery-meta { font-size: 13px; opacity: 0.6; }
.video-gallery-duration {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.8); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 12px;
}

/* -----------------------------------------------
   PHOTO GALLERY PAGE
----------------------------------------------- */
.photo-gallery-card { margin-bottom: 40px; }
.photo-gallery-thumb {
    position: relative; overflow: hidden;
    border-radius: 8px; background: #f3f4f6; cursor: pointer; height: 300px;
}
.photo-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.photo-gallery-card:hover .photo-gallery-thumb img { transform: scale(1.05); }
.photo-gallery-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0);
    display: flex; align-items: center; justify-content: center; transition: background 0.3s;
}
.photo-gallery-card:hover .photo-gallery-overlay { background: rgba(0,0,0,0.3); }
.photo-gallery-overlay-icon { opacity: 0; transform: scale(0.8); transition: all 0.3s; color: #fff; }
.photo-gallery-card:hover .photo-gallery-overlay-icon { opacity: 1; transform: scale(1); }
.photo-gallery-count {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.7); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px;
}
.photo-gallery-content { padding: 14px 0; }
.photo-gallery-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.photo-gallery-meta { font-size: 13px; opacity: 0.6; }

/* -----------------------------------------------
   PROJECT DETAIL PAGE
----------------------------------------------- */
.tp-pd-2-video-wrap {
    position: relative; padding-bottom: 56.25%;
    height: 0; overflow: hidden; border-radius: 8px;
}
.tp-pd-2-video-wrap iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.tp-pd-2-bottom {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    overflow: hidden;
}
.tp-pd-2-bottom-item {
    padding: 24px 20px;
    text-align: center !important;
    position: relative;
}
.tp-pd-2-bottom-item + .tp-pd-2-bottom-item::before {
    content: '';
    position: absolute; left: 0; top: 15%; height: 70%; width: 1px;
    background: rgba(0,0,0,0.08);
}
.tp-pd-2-bottom-item span {
    display: block; font-size: 11px; text-transform: uppercase;
    letter-spacing: 1.5px; color: #999; margin-bottom: 6px;
}
.tp-pd-2-bottom-item h6 { margin: 0; font-size: 15px; font-weight: 600; }
@media (max-width: 767px) {
    .tp-pd-2-bottom { grid-template-columns: repeat(2, 1fr) !important; position: relative; }
    .tp-pd-2-bottom-item + .tp-pd-2-bottom-item::before { display: none; }
    .tp-pd-2-bottom-item { box-shadow: none; }
    .tp-pd-2-bottom-item:nth-child(2)::after {
        content: ''; position: absolute; bottom: 0; left: -100%; width: 200%; height: 1px;
        background: rgba(0,0,0,0.08);
    }
    .tp-pd-2-bottom-item:nth-child(odd)::after {
        content: ''; position: absolute; right: 0; top: 0; width: 1px; height: 100%;
        background: rgba(0,0,0,0.08);
    }
}

/* -----------------------------------------------
   PROJECTS INDEX PAGE
----------------------------------------------- */
.tp-portfolio-inner-thumb {
    aspect-ratio: 320 / 200;
    overflow: hidden; border-radius: 8px; background: #f3f4f6;
}
.tp-portfolio-inner-thumb img { width: 100%; height: 100%; object-fit: cover; }
