/*
Theme Name: JSL Drainage Bootstrap
Author: Gemini Assistant
Description: Conversion-optimized Bootstrap 5 theme for JSL Drainage.
Version: 1.2
Text Domain: jsl-bootstrap
*/

:root {
    --jsl-blue: #383f92;
    --jsl-dark: #232323;
    --bs-border-radius-lg: 20px; /* Modern rounded corners */
}

/* --- Mobile Header Optimization --- */
@media (max-width: 991px) {
    /* Target the phone link in the header specifically */
    header .btn-primary.fs-4 {
        font-size: 1.15rem !important; /* Shrinks from fs-4 size */
        padding-left: 12px !important;
        padding-right: 12px !important;
        letter-spacing: -0.5px; /* Tighter spacing to save horizontal room */
        white-space: nowrap;    /* Strictly prevents the number from breaking into 2 lines */
    }

    /* Reduce the icon margin to save a few more pixels */
    header .btn-primary.fs-4 i {
        margin-right: 4px !important;
    }
    
    /* Adjust the logo size slightly if it's still tight */
    header img {
        max-width: 140px !important;
    }
}

/* Extra tight fix for very small phones (iPhone SE etc) */
@media (max-width: 375px) {
    header .btn-primary.fs-4 {
        font-size: 1rem !important;
        padding: 8px 10px !important;
    }
}

/* Custom JSL Light Blue */
.icon-blue {
    color: #1d71b8 !important;
}

/* Star colors for Google Reviews */
.text-warning {
    color: #ffb400 !important; /* Gold stars look best with that blue */
}

.sidebar-trust-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}
/* Custom Light Blue for Checkmarks */
.icon-blue {
    color: #1d71b8 !important; /* A bright, clean light blue */
    font-size: 1.1rem;
}

/* Optional: Add a subtle glow to make them look more 'premium' */
.icon-blue {
    text-shadow: 0 0 10px rgba(0, 180, 216, 0.2);
}

.list-unstyled li i {
    font-size: 1.1rem;
}
.text-muted.small {
    font-size: 0.85rem;
    line-height: 1.2;
    display: block;
}

.share-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #f8f9fa;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.share-links a:hover {
    background: var(--jsl-blue);
    color: #fff !important;
    transform: translateY(-3px);
}

/* 1. Force the Header to the top-most layer */
header.sticky-top {
    z-index: 1050 !important; /* Higher than Bootstrap's default sticky */
}

/* 2. Adjust the Sidebar Sticky position */
/* This 'top' value should be the height of your header (approx 130px) */
.col-lg-4 .sticky-top {
    top: 200px !important; 
    z-index: 1000 !important; /* Lower than the header */
}

/* 3. Smooth out the transition */
.sticky-top {
    transition: top 0.3s ease;
}

/* --- Professional Link Hover Effect --- */
.entry-content a:not(.btn), 
.content-body a:not(.btn) {
    color: var(--jsl-blue);
    text-decoration: none;
    position: relative;
    fw-bold;
    transition: color 0.3s ease;
}

/* Create the custom underline */
.entry-content a:not(.btn)::after,
.content-body a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--jsl-blue);
    transform: scaleX(0); /* Start invisible */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

/* The Animation */
.entry-content a:not(.btn):hover,
.content-body a:not(.btn):hover {
    color: #000; /* Darken text slightly on hover */
}

.entry-content a:not(.btn):hover::after,
.content-body a:not(.btn):hover::after {
    transform: scaleX(1); /* Slide the underline in */
    transform-origin: bottom left;
}

/* --- Animated Hamburger --- */
.hamburger-icon {
    width: 30px;
    height: 24px;
    position: relative;
    margin: 10px;
    transform: rotate(0deg);
    transition: .5s ease-in-out;
    cursor: pointer;
}

.hamburger-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--jsl-blue); /* Matches your brand blue */
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

/* Position the three bars */
.hamburger-icon span:nth-child(1) { top: 0px; }
.hamburger-icon span:nth-child(2) { top: 10px; }
.hamburger-icon span:nth-child(3) { top: 20px; }

/* ANIMATION: When the button is NOT collapsed (Menu is Open) */
.navbar-toggler:not(.collapsed) .hamburger-icon span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.navbar-toggler:not(.collapsed) .hamburger-icon span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.navbar-toggler:not(.collapsed) .hamburger-icon span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* If the menu is inside the dark blue bar, make the spans white */
nav.navbar-dark .hamburger-icon span {
    background: #ffffff !important;
}

/* --- Internal Navigation Force Styles --- */

/* 1. Target every anchor tag inside that specific blue nav bar */
nav.navbar-dark .navbar-nav a, 
nav.navbar-dark .navbar-nav li a,
nav.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;           /* Forces White */
    text-decoration: none !important;    /* Removes Underline */
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    padding: 15px 20px !important;
    display: inline-block !important;
    transition: background 0.3s ease;
}

/* 2. Remove the bullet points WordPress might be adding */
nav.navbar-dark ul, 
nav.navbar-dark li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 3. Handle the Hover State */
nav.navbar-dark .navbar-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* 4. Fix for Mobile display (making them stack properly) */
@media (max-width: 991px) {
    nav.navbar-dark .navbar-nav {
        display: block !important;
        width: 100%;
    }
    nav.navbar-dark .navbar-nav li {
        display: block !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    nav.navbar-dark .navbar-nav a {
        display: block !important;
        padding: 12px 0 !important;
    }
}

/* --- Internal Navigation (Blue Bar) --- */

/* Target the bar itself */
.navbar.navbar-dark {
    min-height: 50px;
}

/* Remove default link styling and force white text */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-nav ul li a {
    color: #ffffff !important;
    text-decoration: none !important; /* Removes the underline */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 12px 20px !important;
    display: block;
    transition: all 0.3s ease;
}

/* Hover State: Subtle background change */
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav ul li a:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
}

/* Active Page: Highlight the page they are currently on */
.navbar-dark .navbar-nav .current-menu-item a,
.navbar-dark .navbar-nav .current-menu-item .nav-link {
    background-color: rgba(0, 0, 0, 0.25) !important;
}

/* Remove bullets if WordPress adds them */
.navbar-nav, .navbar-nav ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--jsl-blue);
        text-align: center;
        padding-bottom: 15px;
    }
    .navbar-dark .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--jsl-dark);
    line-height: 1.6;
}

/* Internal Navigation Styling */
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 1rem 1.5rem !important;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: background 0.3s;
}

.navbar-nav .nav-link:hover {
    background: rgba(0,0,0,0.1);
    color: #fff !important;
}

/* Ensure the active page link stands out */
.navbar-nav .current-menu-item .nav-link {
    background: rgba(0,0,0,0.2);
    color: #fff !important;
}

/* Fix for mobile menu background */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--jsl-blue);
        padding-bottom: 1rem;
    }
}

header img[alt*="Qualified"], 
header img[alt*="Registered"] {
    transition: opacity 0.3s ease;
    filter: grayscale(10%) contrast(110%);
}

/* Specialist Services Styling */
.bg-light.rounded-4 {
    transition: transform 0.3s ease;
}

.bg-light.rounded-4:hover {
    box-shadow: 0 1rem 3rem rgba(56, 63, 146, 0.1) !important;
}

/* Ensure the checkmarks stand out */
.fa-check {
    font-size: 0.8rem;
}

/* 1. Backgrounds & Text */
.bg-primary { background-color: var(--jsl-blue) !important; }
.text-primary { color: var(--jsl-blue) !important; }

/* 2. Fix for .border-primary */
.border-primary { 
    border-color: var(--jsl-blue) !important; 
}

/* 3. Fix for .btn-primary */
.btn-primary {
    background-color: var(--jsl-blue) !important;
    border-color: var(--jsl-blue) !important;
}
.btn-primary:hover {
    background-color: #2a2f6e !important;
    border-color: #2a2f6e !important;
}

/* 4. Fix for .btn-outline-primary (the "Read More" buttons) */
.btn-outline-primary {
    color: var(--jsl-blue) !important;
    border-color: var(--jsl-blue) !important;
}
.btn-outline-primary:hover {
    background-color: var(--jsl-blue) !important;
    border-color: var(--jsl-blue) !important;
    color: #fff !important;
}

/* 5. Rounded Corners Fix */
.rounded-4, .rounded-3 {
    border-radius: var(--bs-border-radius-lg) !important;
}

/* 6. Clicky Button Animation (Updated shadow color to match JSL Blue) */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 63, 146, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(56, 63, 146, 0); }
  100% { transform: scale(1); }
}
.pulse-call { animation: pulse 2s infinite; }

/* Sticky Mobile Adjustments */
@media (max-width: 767px) {
    body { padding-bottom: 80px; }
    h1 { font-size: 1.8rem; }
}