/* General Styles */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
}

h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem) !important;
}

/* Navbar */
.navbar-custom {
    background: transparent;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar-custom.scrolled {
    position: fixed;
    background: #1a2533;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.navbar-custom .nav-link {
    color: #fff;
    font-weight: 500;
    margin: 0 10px;
}

.navbar-custom .nav-link:hover {
    color: #eabe65;
}

.navbar-custom .sp-dropdown {
    display: none;
    position: absolute;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    list-style: none;
    border-radius: 5px;
}

.navbar-custom .sp-has-child:hover .sp-dropdown {
    display: block;
}

.navbar-custom .sp-dropdown-items {
    padding: 0;
    margin: 0;
    list-style: none;
}

.navbar-custom .sp-dropdown-items .sp-menu-item a {
    display: block;
    padding: 8px 20px;
    color: #333;
    text-decoration: none;
}

.navbar-custom .sp-dropdown-items .sp-menu-item a:hover {
    background: #f8f9fa;
    color: #eabe65;
}

.sp-megamenu-parent {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.sp-megamenu-parent>li>a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    font-weight: 500;
    white-space: nowrap;
}

.sp-megamenu-parent>li>a:hover {
    color: #eabe65;
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .sp-megamenu-parent>li>a {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('image/slider.jpg') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    padding-top: 140px;
    padding-bottom: 80px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    color: #eabe65;
}

.hero-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-primary-custom {
    background-color: #eabe65;
    border-color: #eabe65;
    color: #fff;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
}

.btn-primary-custom:hover {
    background-color: #d68910;
    border-color: #d68910;
    color: #fff;
}

/* Big Law Quality Section */
.big-law-section {
    padding: 80px 0;
}

.big-law-title {
    color: #eabe65;
    font-weight: 700;
}

/* Stats and Map Section */
.stats-map-section .container {
    max-width: 1000px !important;
}

/* Henry Phoon Section */
.henry-section {
    background: url('image/bg004.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 80px 0;
}

.btn-outline-custom {
    border: 2px solid #fff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
}

.btn-outline-custom:hover {
    background: #fff;
    color: #0f2b46;
}

/* About Group Photo */
.about-group-photo {
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 450px;
}

/* Why Choose Us */
.why-choose-us {
    padding: 80px 0;
    text-align: center;
}

.why-card {
    background: #0f2b46;
    color: white;
    padding: 40px 20px;
    border-radius: 10px;
    height: 100%;
    transition: transform 0.3s;
}

.why-card:hover {
    transform: translateY(-10px);
}

.why-card h4 {
    color: #eabe65;
    margin-top: 20px;
}

.why-card.light {
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Trusted By & Awards */
.trusted-section,
.awards-section {
    padding: 60px 0;
    text-align: center;
    background: #f8f9fa;
}

.trusted-section h2,
.awards-section h2,
.services-section h2 {
    margin-bottom: 40px;
    font-weight: 700;
    font-size: 2.5rem;
}

.logo-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.logo-row img {
    max-height: 120px;
    object-fit: contain;
}

/* Infinite Scrolling Marquee for Logos */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 50px;
    width: max-content;
    animation: scroll-marquee 40s linear infinite;
}

.marquee-track img {
    max-height: 90px;
    object-fit: contain;
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 25px));
    }
}

/* Services */
.services-section {
    padding: 80px 0;
    text-align: center;
}

.service-card {
    border: 1px solid #eabe65;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(234, 190, 101, 0.2);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-card-body {
    padding: 30px 20px;
    background-color: #0f2b46;
}

.service-card-body h5 {
    color: #eabe65;
    font-weight: 700;
}

/* CTA Banner */
.cta-banner {
    background: url('image/bg001.jpg') no-repeat center center/cover;
    position: relative;
    padding: 80px 0;
    text-align: center;
    color: white;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 43, 70, 0.85);
}

.cta-content {
    position: relative;
    z-index: 1;
}

/* Reviews */
.reviews-section {
    padding: 80px 0;
    text-align: center;
}

.review-img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Quick Facts */
.quick-facts {
    padding: 80px 0;
    text-align: center;
    background: #f9f9f9;
}

.fact-item {
    margin-bottom: 30px;
}

.fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #eabe65;
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Contact Form */
.contact-section {
    padding: 80px 0;
}

.contact-form-wrapper {
    background: #0f2b46;
    padding: 40px;
    border-radius: 10px;
    color: white;
}

.contact-form-wrapper h2 {
    color: #eabe65;
    margin-bottom: 20px;
    text-align: center;
}

.form-control {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.form-control:focus {
    background: transparent;
    color: white;
    border-color: #eabe65;
    box-shadow: none;
}

/* Footer Banner */
.footer-banner {
    background: url('image/bg004.jpg') no-repeat center center/cover;
    padding: 100px 0;
    text-align: center;
    color: white;
    position: relative;
}

.footer-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 43, 70, 0.85);
}

.footer-banner-content {
    position: relative;
    z-index: 1;
}

/* Main Footer */
.main-footer {
    padding: 40px 0;
    background: #fff;
    color: #666;
    font-size: 0.9rem;
}

.main-footer a {
    color: #666;
    text-decoration: none;
}

.main-footer a:hover {
    color: #eabe65;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

/* Tablet and Mobile Group Photo Adjustments */
@media (max-width: 1199.98px) {
    .about-group-photo {
        min-height: auto !important;
        height: auto !important;
    }

    /* Mobile Menu */
    .mobile-menu-list {
        margin-top: 10px;
    }
    
    .mobile-menu-item {
        padding: 12px 0;
    }
    
    .mobile-menu-item > a {
        color: #0f2b46;
        text-decoration: none;
        font-size: 1.1rem;
        font-weight: 500;
    }
    
    .mobile-menu-item > a.active,
    .mobile-menu-item > a:hover {
        color: #eabe65;
    }
    
    .mobile-submenu {
        padding-left: 15px;
        margin-top: 10px;
    }
    
    .mobile-submenu a {
        color: #0f2b46;
        text-decoration: none;
        font-size: 0.95rem;
        display: block;
        padding: 8px 0;
    }

    .mobile-submenu a:hover {
        color: #eabe65;
    }
    
    .mobile-menu-item a[aria-expanded="true"] i {
        transform: rotate(90deg);
    }
    
    .mobile-menu-item i {
        transition: transform 0.3s ease;
        font-size: 0.9rem;
        color: #0f2b46;
    }
}

/* Tablet Optimizations (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 100vh;
        height: auto;
        align-items: flex-start;
        padding-top: 140px;
        padding-bottom: 60px;
    }

    /* Fix overlapping cards on Why Choose Us */
    .why-choose-us .col-lg-4>div {
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 15px !important;
    }

    /* Limit image height for Founder section when stacked */
    .henry-section img {
        height: 350px !important;
        object-fit: cover;
    }

    /* Adjust heavy paddings */
    .p-5 {
        padding: 2rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Mobile Optimizations (max-width: 768px) */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero-text {
        font-size: 1rem !important;
    }

    .about-us-section h2 {
        font-size: 2rem !important;
    }

    .stats-map-section h2 {
        font-size: 2.5rem !important;
    }

    .henry-section h2 {
        font-size: 2rem !important;
    }

    .contact-info-section {
        padding: 50px 15px;
    }

    /* Fix facts alignment */
    .fact-item {
        margin-bottom: 40px;
    }

    .contact-form-wrapper {
        padding: 20px;
    }

    .contact-form-wrapper h2 {
        font-size: 1.6rem !important;
    }

    .footer-banner h2 {
        font-size: 1.8rem !important;
    }
}

/* Floating Action Button (FAB) */
.fab-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.fab-checkbox {
    display: none;
}

@keyframes fab-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 190, 101, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(234, 190, 101, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 190, 101, 0);
    }
}

.fabchat {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #0f2b46;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid #eabe65;
    animation: fab-pulse 2s infinite;
}

.fabchat:hover {
    background: #1a2533;
    transform: scale(1.05);
}

#hover_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eabe65;
    font-size: 1.6rem;
    transition: transform 0.3s ease;
}

.fabchat:hover #hover_icon {
    transform: rotate(10deg) scale(1.1);
}

#hover_text {
    position: absolute;
    right: 75px;
    background: #0f2b46;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eabe65;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.fabchat:hover #hover_text {
    opacity: 1;
    visibility: visible;
}

#close {
    display: none;
    font-size: 1.4rem;
    font-weight: bold;
    color: #eabe65;
    line-height: 1;
}

/* Checkbox Toggle States */
.fab-checkbox:checked + .fabchat {
    background: #eabe65;
    border-color: #0f2b46;
    animation: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fab-checkbox:checked + .fabchat #hover_icon {
    display: none !important;
}

.fab-checkbox:checked + .fabchat #hover_text {
    display: none !important;
}

.fab-checkbox:checked + .fabchat #close {
    display: block;
    color: #0f2b46;
}

/* Options Menu */
.fab-options {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    bottom: 75px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-checkbox:checked ~ .fab-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Individual Option Button styling */
.floating_button {
    position: relative;
}

.floating_button button {
    border: none;
    outline: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible !important; /* Ensure content outside button isn't clipped */
}

.floating_button button i {
    position: static !important; /* Prevent nesting context from confining tooltip */
    overflow: visible !important;
}

.floating_button button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Hover Tooltip for Options */
.floating_button .hover_text {
    position: absolute;
    right: 65px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f2b46;
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eabe65;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999999 !important;
}

.floating_button:hover .hover_text,
.floating_button button:hover .hover_text {
    opacity: 1;
    visibility: visible;
}

/* Social Media Button Colors */
.facebook-button {
    background: #25d366; /* WhatsApp green */
}
.email-button {
    background: #ea4335; /* Gmail red */
}
.phone-button {
    background: #34b7f1; /* Phone blue */
}
.instagram-button {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.tiktok-button {
    background: #0077b5; /* LinkedIn blue */
}

/* Inner Blob Ambient Glow on Hover */
.inner_blob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
    transition: all 0.3s ease;
    filter: blur(10px);
}

.floating_button:hover .inner_blob {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.3);
}

/* Apply specific button backgrounds to their respective blob */
#facebook .inner_blob { background: #25d366; }
#email .inner_blob { background: #ea4335; }
#phone .inner_blob { background: #34b7f1; }
#instagram .inner_blob { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
#tiktok .inner_blob { background: #0077b5; }

/* Mobile adjustments */
@media (max-width: 768px) {
    .fab-wrapper {
        bottom: 20px;
        right: 20px;
    }
    
    .fabchat {
        width: 50px;
        height: 50px;
    }
    
    #hover_icon {
        font-size: 1.3rem;
    }
    
    #hover_text {
        right: 65px;
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .fab-options {
        bottom: 60px;
        right: 0px;
        gap: 12px;
    }
    
    .floating_button button {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .floating_button .hover_text {
        right: 55px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}