/*
Theme Name: FYBB
Theme URI: http://localhost/fybbwp/
Author: FYBB Innovations Private Limited
Author URI: https://fybb.co
Description: A connected, high-performance Elementor-compatible WordPress theme for FYBB Group.
Version: 1.0.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: fybb
*/

/* WordPress Core Elements Support */
.alignnone {
    margin: 5px 20px 20px 0;
}
.aligncenter, div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}
.alignright {
    float:right;
    margin: 5px 0 20px 20px;
}
.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}
.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}
.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}
.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}
.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}
.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}
.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   Header & Footer Builder (Turbo Addons) Display Overrides
   Ensure custom templates inside #tahefobu-header and .turbo-footer-template
   are NEVER hidden by Turbo's body-level hide-theme rules.
   ========================================================================== */
body.turbo-hide-theme-header #tahefobu-header,
body.turbo-hide-theme-header #tahefobu-header .site-header,
body.turbo-hide-theme-header .turbo-header-template,
body.turbo-hide-theme-header .turbo-header-template .site-header,
#tahefobu-header .site-header,
.turbo-header-template .site-header {
    display: block !important;
}

body.tahefobu-hide-theme-footer .turbo-footer-template,
body.tahefobu-hide-theme-footer .turbo-footer-template .footer,
.turbo-footer-template .footer {
    display: block !important;
}

body.tahefobu-hide-theme-footer .turbo-footer-template .footer-bottom,
.turbo-footer-template .footer-bottom {
    display: flex !important;
}

.reading-progress {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    z-index: 9999999 !important;
    height: 3px !important;
    background: var(--azure, #59a8f8) !important;
    width: 0%;
    pointer-events: none !important;
    transform: translateZ(0);
}

@media (max-width: 650px) {
    body.tahefobu-hide-theme-footer .turbo-footer-template .footer-bottom,
    .turbo-footer-template .footer-bottom {
        display: flex !important;
        flex-wrap: wrap !important;
    }
}

/* ElementsKit Header, Nav Menu, and Brand styles are maintained in assets/css/style.css. */

/* ==========================================================================
   Elementor Editor Preview Visibility & Canvas Optimizations
   ========================================================================== */
body.elementor-editor-active .reveal,
.elementor-editor-active .reveal,
.elementor-editor-preview .reveal,
.elementor-editor-active .motion-ready .reveal,
body.elementor-editor-active .motion-ready .reveal {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
}

body.elementor-editor-active .logo-ribbon,
.elementor-editor-active .logo-ribbon {
    overflow: hidden !important;
    position: relative !important;
}

body.elementor-editor-active .logo-track,
.elementor-editor-active .logo-track {
    display: flex !important;
    width: max-content !important;
}

body.elementor-editor-active .logo-group,
.elementor-editor-active .logo-group {
    display: flex !important;
    gap: 32px !important;
    align-items: center !important;
}

body.elementor-editor-active .world-stage,
.elementor-editor-active .world-stage {
    position: relative !important;
}

body.elementor-editor-active .directory-panels article:not([hidden]),
.elementor-editor-active .directory-panels article:not([hidden]) {
    display: block !important;
    opacity: 1 !important;
}

body.elementor-editor-active dialog#work-viewer,
.elementor-editor-active dialog#work-viewer {
    display: none;
}

body.elementor-editor-active dialog#work-viewer[open],
.elementor-editor-active dialog#work-viewer[open] {
    display: block;
}

/* ==========================================================================
   About Page Office Image Widget & Container (Authentic wide-photo wrap)
   ========================================================================== */
.wide-photo-wrap,
.elementor-element-sec_office_photo {
    width: calc(100% - 112px) !important;
    max-width: 1504px !important;
    margin-inline: auto !important;
    margin-top: 0 !important;
    margin-bottom: 50px !important;
    padding: 0 !important;
}

@media (max-width: 1150px) {
    .wide-photo-wrap,
    .elementor-element-sec_office_photo {
        width: calc(100% - 72px) !important;
    }
}

@media (max-width: 900px) {
    .wide-photo-wrap,
    .elementor-element-sec_office_photo {
        width: calc(100% - 48px) !important;
    }
}

@media (max-width: 650px) {
    .wide-photo-wrap,
    .elementor-element-sec_office_photo {
        width: calc(100% - 40px) !important;
        margin-bottom: 35px !important;
    }
}

.elementor-element-sec_office_photo .elementor-widget-container,
.wide-photo-wrap .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
}

.elementor-element-sec_office_photo .elementor-widget-image figure,
.wide-photo-wrap .elementor-widget-image figure {
    margin: 0 !important;
    width: 100% !important;
    display: block !important;
}

.elementor-element-sec_office_photo .elementor-widget-image img,
.wide-photo-wrap .elementor-widget-image img,
.elementor-element-wid_office_img img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 620px !important;
    object-fit: cover !important;
    display: block !important;
}

@media (max-width: 650px) {
    .elementor-element-sec_office_photo .elementor-widget-image img,
    .wide-photo-wrap .elementor-widget-image img,
    .elementor-element-wid_office_img img {
        height: 330px !important;
        max-height: 330px !important;
        object-fit: cover !important;
    }
}

.elementor-element-sec_office_photo .elementor-widget-image figcaption,
.wide-photo-wrap .elementor-widget-image figcaption,
.elementor-element-wid_office_img figcaption {
    font-size: 10px !important;
    color: var(--muted, #626974) !important;
    padding: 13px 0 0 0 !important;
    text-align: left !important;
    font-style: normal !important;
    line-height: 1.5 !important;
}

@media (max-width: 650px) {
    .elementor-element-sec_office_photo .elementor-widget-image figcaption,
    .wide-photo-wrap .elementor-widget-image figcaption,
    .elementor-element-wid_office_img figcaption {
        font-size: 9px !important;
    }
}

/* ==========================================================================
   Pathfinder Section Full-Width Background
   ========================================================================== */
.pathfinder {
    background: #eaf3ff;
    width: 100% !important;
}

.elementor-element-sec_ad7c9f31,
.elementor-element-sec_e34407ca {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.elementor-element-sec_ad7c9f31 .elementor-widget-container,
.elementor-element-sec_e34407ca .elementor-widget-container,
.elementor-element-sec_ad7c9f31 .section.pathfinder,
.elementor-element-sec_e34407ca .section.pathfinder {
    width: 100% !important;
}


.reading-progress {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: auto !important;
    z-index: 9999999 !important;
    height: 3px !important;
    background: var(--azure, #59a8f8) !important;
    width: 0%;
    pointer-events: none !important;
    transform: translateZ(0);
}

@media (max-width: 650px) {
    .about-full-photo .elementor-widget-image img,
    .elementor-element-sec_office_photo .elementor-widget-image img {
        height: 330px;
        object-fit: cover;
    }
    .about-full-photo .elementor-widget-image figcaption,
    .elementor-element-sec_office_photo .elementor-widget-image figcaption {
        font-size: 9px !important;
        padding: 10px 20px 0 !important;
    }
}

/* ==========================================================================
   Journal Archive Filter Grid Styles (matches journal.html)
   ========================================================================== */
.elementor-widget-fybb_journal_filter,
.elementor-widget-fybb_journal_filter .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
}

.page-journal .journal-grid,
.elementor-widget-fybb_journal_filter .journal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 64px 32px !important;
}

.page-journal .journal-card:first-child,
.elementor-widget-fybb_journal_filter .journal-card:first-child {
    grid-column: span 2 !important;
    grid-row: auto !important;
}

.page-journal .journal-card:first-child .journal-image,
.elementor-widget-fybb_journal_filter .journal-card:first-child .journal-image {
    aspect-ratio: 1.72 !important;
}

.page-journal .journal-card:first-child h3,
.elementor-widget-fybb_journal_filter .journal-card:first-child h3 {
    font-size: 34px !important;
    font-weight: 400 !important;
}

.page-journal .journal-card:first-child p,
.elementor-widget-fybb_journal_filter .journal-card:first-child p {
    font-size: 14px !important;
}

.page-journal .journal-card h3,
.elementor-widget-fybb_journal_filter .journal-card h3 {
    font-weight: 400 !important;
}

/* Equal Height Images & Flexbox Cards */
.equal-height-grid .journal-card,
.elementor-widget-fybb_journal_filter .equal-height-grid .journal-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.equal-height-grid .journal-card .journal-image,
.elementor-widget-fybb_journal_filter .equal-height-grid .journal-card .journal-image {
    width: 100% !important;
    flex-shrink: 0 !important;
    margin-bottom: 23px;
}

.equal-height-grid .journal-card .journal-image img,
.elementor-widget-fybb_journal_filter .equal-height-grid .journal-card .journal-image img {
    width: 100% !important;
    height: 100% !important;
}

.equal-height-grid .journal-card p,
.elementor-widget-fybb_journal_filter .equal-height-grid .journal-card p {
    flex-grow: 1 !important;
    margin-bottom: 16px !important;
}

.equal-height-grid .journal-card > .text-link,
.elementor-widget-fybb_journal_filter .equal-height-grid .journal-card > .text-link {
    margin-top: auto !important;
    width: 100% !important;
}

/* No-Featured modifier (when user chooses completely uniform grid) */
.journal-grid.no-featured,
.elementor-widget-fybb_journal_filter .journal-grid.no-featured {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.journal-grid.no-featured .journal-card:first-child,
.elementor-widget-fybb_journal_filter .journal-grid.no-featured .journal-card:first-child {
    grid-column: auto !important;
}

.journal-grid.no-featured .journal-card:first-child .journal-image,
.elementor-widget-fybb_journal_filter .journal-grid.no-featured .journal-card:first-child .journal-image {
    aspect-ratio: 1.5 !important;
}

.journal-grid.no-featured .journal-card:first-child h3,
.elementor-widget-fybb_journal_filter .journal-grid.no-featured .journal-card:first-child h3 {
    font-size: 23px !important;
}

.journal-grid.no-featured .journal-card:first-child p,
.elementor-widget-fybb_journal_filter .journal-grid.no-featured .journal-card:first-child p {
    font-size: 12px !important;
}

@media (max-width: 1150px) {
    .page-journal .journal-card:first-child h3,
    .elementor-widget-fybb_journal_filter .journal-card:first-child h3 {
        font-size: 32px !important;
    }
}

@media (max-width: 900px) {
    .page-journal .journal-grid,
    .elementor-widget-fybb_journal_filter .journal-grid,
    .journal-grid.no-featured,
    .elementor-widget-fybb_journal_filter .journal-grid.no-featured {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 44px 24px !important;
    }
}

@media (max-width: 650px) {
    .page-journal .journal-grid,
    .elementor-widget-fybb_journal_filter .journal-grid,
    .journal-grid.no-featured,
    .elementor-widget-fybb_journal_filter .journal-grid.no-featured {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 40px !important;
    }
    .page-journal .journal-card:first-child,
    .elementor-widget-fybb_journal_filter .journal-card:first-child {
        grid-column: auto !important;
    }
    .page-journal .journal-card:first-child .journal-image,
    .elementor-widget-fybb_journal_filter .journal-card:first-child .journal-image {
        aspect-ratio: 1.5 !important;
    }
    .page-journal .journal-card:first-child h3,
    .elementor-widget-fybb_journal_filter .journal-card:first-child h3 {
        font-size: 25px !important;
    }
    .page-journal .journal-card:first-child p,
    .elementor-widget-fybb_journal_filter .journal-card:first-child p {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .page-journal .journal-card:first-child h3,
    .elementor-widget-fybb_journal_filter .journal-card:first-child h3 {
        font-size: 22px !important;
    }
}

@media (max-width: 380px) {
    .page-journal .journal-card:first-child h3,
    .elementor-widget-fybb_journal_filter .journal-card:first-child h3 {
        font-size: 20px !important;
    }
}

/* ==========================================================================
   Home Page: Selected Work & Client Logo Ribbon Pixel-Perfect Styling
   ========================================================================== */

/* Selected Work Layout */
.f-work {
    border-top: 1px solid var(--line);
}

.f-work .section-head h2 {
    font-weight: 400;
}

.f-work-layout {
    display: grid !important;
    grid-template-columns: 1.3fr 1fr !important;
    gap: 50px 50px !important;
    align-items: start !important;
}

.f-work-card {
    min-width: 0;
}

.f-work-card.work-0 {
    grid-row: span 2 !important;
}

/* Fallback if more than 3 works are added in Elementor */
.f-work-card:nth-child(4):last-child {
    grid-column: 1 / -1 !important;
}

.work-open {
    border: 0;
    padding: 0;
    display: block;
    width: 100%;
    position: relative;
    background: #eff0f3;
    overflow: hidden;
    aspect-ratio: 1.6;
    cursor: pointer;
}

.work-0 .work-open {
    aspect-ratio: 0.83 !important;
    background: #e5e9ee !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 38px !important;
    perspective: 1200px !important;
}

.work-0 .work-open > img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    box-shadow: 0 30px 40px #17233630 !important;
    transform: rotateY(-9deg) rotateX(4deg) !important;
    border: 1px solid #ffffff !important;
    transition: transform 1.4s var(--ease) !important;
}

.work-0 .work-open:hover > img {
    transform: rotateY(0) rotateX(0) scale(1.02) !important;
}

.work-0 .work-open:before {
    content: attr(data-work-name) !important;
    font-family: Poppins, sans-serif !important;
    font-size: clamp(38px, 4vw, 65px) !important;
    font-weight: 300 !important;
    letter-spacing: -0.065em !important;
    position: absolute !important;
    left: 38px !important;
    top: 40px !important;
    color: #53657d !important;
    pointer-events: none !important;
    z-index: 2;
}

.work-open > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 1.4s var(--ease);
}

.work-open:hover > img {
    transform: scale(1.04);
}

.work-view {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    background: #fffffff0;
    padding: 10px 15px;
    font-size: 10px;
    opacity: 0;
    transform: translateY(5px);
    transition: transform 0.3s, opacity 0.3s;
    z-index: 3;
}

.work-view i {
    font-style: normal;
    font-size: 18px;
}

.work-open:hover .work-view,
.work-open:focus-visible .work-view {
    opacity: 1;
    transform: none;
}

.work-caption {
    margin-top: 25px;
    position: relative;
    padding-right: 25px;
}

.work-caption > span {
    display: block;
    font-size: 8px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a909a;
    margin-bottom: 13px;
}

.work-caption > h3 {
    font-size: 30px;
    font-weight: 400;
    margin-bottom: 10px;
}

.work-caption > p {
    font-size: 12px;
    margin: 0;
}

.work-project-link {
    display: inline-flex;
    gap: 28px;
    font-size: 12px;
    border-bottom: 1px solid #aab3c2;
    padding: 12px 0 7px;
    margin-top: 5px;
    color: inherit;
    text-decoration: none;
}

.work-project-link:hover {
    color: #4951fe;
}

.work-source {
    margin: 35px 0 0;
    font-size: 9px;
    color: #87919e;
}

@media (max-width: 900px) {
    .f-work-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 40px !important;
    }
    .f-work-card.work-0 {
        grid-row: auto !important;
    }
    .work-0 .work-open {
        aspect-ratio: 1.05 !important;
        padding: 22px !important;
    }
    .work-0 .work-open:before {
        font-size: 28px !important;
        left: 22px !important;
        top: 18px !important;
    }
}

@media (max-width: 480px) {
    .work-0 .work-open:before {
        font-size: 23px !important;
        left: 18px !important;
        top: 14px !important;
    }
}

@media (max-width: 380px) {
    .work-0 .work-open:before {
        font-size: 20px !important;
        left: 16px !important;
        top: 12px !important;
    }
}

/* Client Logo Ribbon Layout & Typography */
.elementor-element-sec_c27b7b66,
.home .client-home,
.client-home {
    background-color: #f7f8fa !important;
}

.home .client-home {
    padding-block: 65px;
}

.client-home .section-head {
    margin-bottom: 35px;
}

.logo-ribbon {
    overflow: hidden !important;
    padding-block: 10px 30px !important;
    width: 100% !important;
}

.logo-track {
    width: max-content !important;
    display: flex !important;
    animation: logo-move 115s linear infinite !important;
}

.logo-ribbon:hover .logo-track,
.logo-ribbon:focus-within .logo-track {
    animation-play-state: paused !important;
}

.logo-group {
    display: flex !important;
    align-items: center !important;
    gap: 64px !important;
    padding-right: 64px !important;
}

.logo-group img,
.elementor-widget-fybb_client_ribbon .logo-group img {
    width: 145px !important;
    height: 112px !important;
    object-fit: contain !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border-radius: 2px !important;
    display: block !important;
    max-height: none !important;
}

@keyframes logo-move {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

.client-home-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 25px !important;
}

.client-home-bottom .eyebrow {
    color: var(--muted) !important;
    font-size: 9px !important;
}

@media (max-width: 900px) {
    .logo-group {
        gap: 28px !important;
        padding-right: 28px !important;
    }
    .logo-group img,
    .elementor-widget-fybb_client_ribbon .logo-group img {
        width: 105px !important;
        height: 80px !important;
    }
    .client-home-bottom {
        display: block !important;
    }
    .client-home-bottom .eyebrow {
        font-size: 8px !important;
        line-height: 1.9 !important;
        max-width: 290px !important;
    }
    .client-home-bottom .text-link {
        margin-top: 10px !important;
    }
}







