/* Shared Hero Styles */
.sb-hero {
    background: linear-gradient(110deg, #102640 0%, #30659b 100%);
    color: white;
    padding: clamp(60px, 9vw, 100px) 20px clamp(45px, 7vw, 80px);
    position: relative;
    overflow: hidden;
}
.sb-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.sb-breadcrumb {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: clamp(15px, 3vw, 30px);
    color: rgba(255,255,255,0.8);
}
.sb-breadcrumb span {
    color: white;
}
.sb-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: clamp(0.8rem, 1.2vw, 0.9rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.sb-subtitle::before, .sb-subtitle::after {
    content: '';
    display: block;
    height: 2px;
    width: 40px;
    background-color: white;
}
.sb-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    color: white;
}
.sb-title span {
    color: #8cb6d8;
}
.sb-desc {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
}

/* Decorative waves */
.sb-waves {
    position: absolute;
    right: -5%;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    z-index: 1;
    opacity: 0.2;
}
.sb-wave {
    width: 30px;
    height: 120%;
    background-color: rgba(255,255,255,0.6);
    border-radius: 50px;
    transform: rotate(5deg);
}
.sb-wave:nth-child(even) { height: 110%; transform: rotate(-2deg); }
.sb-wave:nth-child(3) { height: 130%; transform: rotate(3deg); }

.sb-nav-bar {
    background: white;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 80px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.sb-nav-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
    gap: 12px;
}
.sb-nav-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 15px 5px;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.sb-nav-container::-webkit-scrollbar { display: none; }

.sb-nav-arrow {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #22456e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    padding: 0;
    outline: none;
    z-index: 2;
}

.sb-nav-arrow:hover {
    background-color: var(--primary-color, #3b71ca);
    color: #ffffff;
    border-color: var(--primary-color, #3b71ca);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(59, 113, 202, 0.25);
}

.sb-nav-arrow:active {
    transform: scale(0.95);
}

.sb-nav-arrow.disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.sb-nav-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
}

@media (max-width: 600px) {
    .sb-nav-wrapper {
        padding: 0 8px;
        gap: 8px;
    }
    .sb-nav-arrow {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .sb-nav-arrow svg {
        width: 14px;
        height: 14px;
    }
}

.sb-nav-pill {
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.sb-nav-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.sb-nav-pill.active {
    background-color: var(--primary-color, #4388cc);
    color: white;
    border-color: var(--primary-color, #4388cc);
}

.sb-content {
    background-color: #f8f9fa;
    padding: 60px 20px;
    min-height: 50vh;
}

/* Portfolio Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.portfolio-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}
.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.portfolio-image {
    position: relative;
    height: 250px;
    background-color: #22456E;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.portfolio-blur-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 38, 64, 0.7) 0%, rgba(48, 101, 155, 0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.portfolio-date-pill {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.portfolio-sector-pill {
    position: relative;
    z-index: 2;
    display: inline-block;
    background: white;
    color: #22456E;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.portfolio-content {
    padding: 25px 20px;
    background: white;
    flex-grow: 1;
}
.portfolio-content h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #22456E;
    margin: 0 0 8px 0;
    line-height: 1.3;
}
.portfolio-content p {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
    font-weight: 500;
}
@media (max-width: 1024px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

/* Modal Styles */
.cs-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.cs-modal-overlay.active {
    display: flex;
    opacity: 1;
}
.cs-modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 16px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}
.cs-modal-overlay.active .cs-modal-content {
    transform: translateY(0);
}
.cs-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: rgba(255,255,255,0.8);
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.cs-modal-close:hover {
    background: white;
    transform: scale(1.1);
}
.cs-modal-header {
    position: relative;
    height: 300px;
    background-color: #22456E;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 30px;
}
.cs-modal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 38, 64, 0.9), rgba(16, 38, 64, 0.3));
}
.cs-modal-title-wrapper {
    position: relative;
    z-index: 2;
    color: white;
}
.cs-modal-title-wrapper h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    color: #ffffff;
}
.cs-modal-title-wrapper p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}
.cs-modal-body {
    padding: 40px 30px;
}
.cs-modal-section {
    margin-bottom: 30px;
}
.cs-modal-section h4 {
    color: var(--primary-color, #3b71ca);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cs-modal-section h4 i {
    font-size: 1.1rem;
}
.cs-modal-section p {
    color: #555;
    line-height: 1.7;
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 600px) {
    .cs-modal-content {
        width: 94%;
        max-height: 92vh;
        border-radius: 12px;
    }
    .cs-modal-header {
        height: 200px;
        padding: 20px 16px;
    }
    .cs-modal-title-wrapper h2 {
        font-size: 1.45rem;
        margin-bottom: 6px;
    }
    .cs-modal-title-wrapper p {
        font-size: 0.92rem;
    }
    .cs-modal-body {
        padding: 24px 16px;
    }
    .cs-modal-section {
        margin-bottom: 20px;
    }
    .cs-modal-section h4 {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }
    .cs-modal-section p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    .cs-modal-close {
        top: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   Back to Top (Scroll to Top) Floating Button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #3D81C3) 0%, #22456E 100%);
    color: #ffffff;
    border: none;
    outline: none;
    box-shadow: 0 4px 16px rgba(34, 69, 110, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    user-select: none;
}

.back-to-top svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    transition: transform 0.25s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 8px 24px rgba(61, 129, 195, 0.42);
    background: linear-gradient(135deg, #4b92d6 0%, #1c3c63 100%);
    color: #ffffff;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(-1px) scale(0.97);
}

/* Offset above the chatbot launcher when present */
body:has(#bayan-chatbot-launcher) .back-to-top,
body.has-chatbot .back-to-top {
    bottom: 104px;
    right: 37px;
}

@media (max-width: 768px) {
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 20px;
        right: 20px;
    }
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    body:has(#bayan-chatbot-launcher) .back-to-top,
    body.has-chatbot .back-to-top {
        bottom: 96px;
        right: 26px;
    }
}

/* === BAYAN IMAGES (added 2026-09-28, keep in repo: public/css/components.css) === */
.hero-modern{background-image:linear-gradient(135deg,rgba(230,240,250,.90) 0%,rgba(200,225,250,.80) 100%),url('/images/home-hero.jpg')!important;background-size:cover;background-position:center}
.sb-hero,.careers-hero,.contact-hero{background-size:cover!important;background-position:center!important}
body:has(.our-story-section) .sb-hero{background-image:linear-gradient(110deg,rgba(16,38,64,.92) 0%,rgba(48,101,155,.72) 100%),url('/images/header-about.jpg')!important}
body:has(.sb-brands-grid) .sb-hero{background-image:linear-gradient(110deg,rgba(16,38,64,.92) 0%,rgba(48,101,155,.72) 100%),url('/images/header-sectors.jpg')!important}
body:has(.services-frame) .sb-hero{background-image:linear-gradient(110deg,rgba(16,38,64,.92) 0%,rgba(48,101,155,.72) 100%),url('/images/header-services.jpg')!important}
body:has(.portfolio-grid) .sb-hero{background-image:linear-gradient(110deg,rgba(16,38,64,.92) 0%,rgba(48,101,155,.72) 100%),url('/images/header-portfolio.jpg')!important}
body:has(.blog-grid) .sb-hero{background-image:linear-gradient(110deg,rgba(16,38,64,.92) 0%,rgba(48,101,155,.72) 100%),url('/images/header-blog.jpg')!important}
.careers-hero{background-image:linear-gradient(135deg,rgba(14,30,50,.92) 0%,rgba(41,94,146,.72) 100%),url('/images/header-careers.jpg')!important}
.contact-hero{background-image:linear-gradient(135deg,rgba(14,30,50,.92) 0%,rgba(41,94,146,.72) 100%),url('/images/header-contact.jpg')!important}
.footer-cta{background-image:linear-gradient(110deg,rgba(16,38,64,.55) 0%,rgba(48,101,155,.35) 100%),url('/images/cta-footer.jpg')!important;background-size:cover!important;background-position:center!important}
