/**
 * Trinity Software Solutions - Custom Styles
 * Modern, Clean Design - No Gradients
 * Color Palette:
 * - Primary Blue: #4A6FA5 (medium-dark muted blue)
 * - Light Blue: #B8D4E3 (pastel sky blue)
 * - Pale Blue: #E8F4F8 (very pale light blue)
 * - Accent Coral: #E85A4F (vibrant reddish-orange)
 * - Dark Navy: #1A1F3A (very dark navy blue)
 */

:root {
    --primary-blue: #4A6FA5;
    --light-blue: #B8D4E3;
    --pale-blue: #E8F4F8;
    --accent-coral: #E85A4F;
    --dark-navy: #1A1F3A;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--white);
}

/* Ensure blog detail page body doesn't interfere with sticky */
body.blog-detail-page {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Breadcrumb Styles */
.breadcrumb-nav {
    padding: 1rem 0;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-light);
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-coral);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-dark);
    font-weight: 500;
}

/* Accessibility Improvements */
.visually-hidden-focusable:focus {
    position: absolute !important;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    z-index: 9999;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Navigation */
#mainNav {
    background: var(--dark-navy);
    padding: 1.2rem 0;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

#mainNav.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.6rem;
    color: var(--white) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
    margin: 0 0.3rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white) !important;
    background: rgba(232, 90, 79, 0.15);
}

.navbar-nav .nav-link::after {
    display: none;
}

/* Hero Section */
.hero-section {
    background: var(--primary-blue);
    color: var(--white);
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(74, 111, 165, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(232, 90, 79, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-section .container {
    position: relative;
    z-index: 10;
}

.hero-section h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-buttons .btn {
    flex: 0 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lead Form in Hero */
.hero-lead-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-lead-form h3 {
    color: var(--dark-navy);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-lead-form p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hero-lead-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--white);
    position: relative;
    z-index: 1;
}

.hero-lead-form .form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.1);
    outline: none;
}

.hero-lead-form .btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.lead-form-benefits {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.lead-form-benefits li {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lead-form-benefits li i {
    color: var(--accent-coral);
    font-size: 0.9rem;
}

/* Buttons */
.btn-primary-custom {
    background: var(--accent-coral);
    border: none;
    color: var(--white);
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    background: #d44a3f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-outline-custom {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-custom:hover {
    background: var(--white);
    color: var(--dark-navy);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* CTA Buttons - Lead Generation */
.cta-button {
    background: var(--accent-coral);
    color: var(--white);
    padding: 16px 36px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.cta-button:hover {
    background: #d44a3f;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.cta-button-secondary {
    background: var(--primary-blue);
    color: var(--white);
}

.cta-button-secondary:hover {
    background: #3d5a87;
    color: var(--white);
}

/* Stats Section */
.stats-section {
    background: var(--pale-blue);
    padding: 100px 0;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.stats-section .row {
    justify-content: center;
}

.stat-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-coral);
}

.stat-card .stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.stat-card i {
    font-size: 3rem;
    color: var(--accent-coral);
    margin-bottom: 1.5rem;
    display: block;
}

/* Section Styles */
.section {
    padding: 120px 0;
}

.section:first-of-type {
    padding-top: 120px;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark-navy);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -1px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 4rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* About Section */
.about-section {
    background: var(--white);
}

.about-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-light);
}

.about-highlight {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Services Section */
.services-section {
    background: var(--pale-blue);
}

.service-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    height: 100%;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-coral);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-coral);
}

.service-card i {
    font-size: 4rem;
    color: var(--accent-coral);
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h4 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Portfolio Section */
.portfolio-section {
    background: var(--white);
}

.portfolio-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    background: var(--white);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

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

.portfolio-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-card h5 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.portfolio-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials-section {
    background: var(--pale-blue);
}

.testimonial-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    height: 100%;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.testimonial-card::before {
    content: '"';
    font-size: 6rem;
    color: var(--accent-coral);
    position: absolute;
    top: 10px;
    left: 20px;
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.9;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    z-index: 1;
}

.testimonial-author img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-coral);
}

.testimonial-author-info h6 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.testimonial-author-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* Contact Section */
.contact-section {
    background: var(--white);
}

.contact-form {
    background: var(--white);
    padding: 3.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.1);
    outline: none;
}

.contact-info {
    padding: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--pale-blue);
    border-radius: 15px;
}

.contact-info-item i {
    font-size: 1.75rem;
    color: var(--accent-coral);
    margin-top: 0.25rem;
}

.contact-info-item h6 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-info-item p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.7;
}

/* Lead Generation CTAs */
.lead-cta-section {
    background: var(--primary-blue);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.lead-cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.lead-cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.lead-cta-inline {
    background: var(--pale-blue);
    padding: 2.5rem;
    border-radius: 15px;
    margin: 2rem auto;
    border-left: 4px solid var(--accent-coral);
    max-width: 800px;
    text-align: center;
}

.lead-cta-inline h4 {
    color: var(--dark-navy);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.lead-cta-inline p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: var(--dark-navy);
    margin-top: 0;
    padding: 4rem 0 2rem;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-coral) !important;
}

.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--accent-coral) !important;
    transform: translateY(-3px);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Disable scroll animations and transforms on blog detail page */
body.blog-detail-page .hero-section {
    transform: none !important;
    animation: none !important;
}

body.blog-detail-page .hero-section h1,
body.blog-detail-page .hero-section .lead,
body.blog-detail-page .hero-section * {
    animation: none !important;
    transform: none !important;
}

body.blog-detail-page .blog-content,
body.blog-detail-page .blog-content * {
    animation: none !important;
    transform: none !important;
}

/* CRITICAL: Don't disable sticky positioning on sidebar - ensure it works */
body.blog-detail-page .blog-sidebar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    transform: none !important;
    animation: none !important;
    height: fit-content !important;
}

/* Ensure sidebar children can have transforms if needed */
body.blog-detail-page .blog-sidebar-wrapper * {
    animation: none !important;
    /* Don't disable transform on children - only on wrapper itself */
}

/* Re-enable necessary transitions for blog content */
body.blog-detail-page .blog-content a,
body.blog-detail-page .blog-content button,
body.blog-detail-page .blog-sidebar-wrapper a,
body.blog-detail-page .blog-sidebar-wrapper button {
    transition: color 0.3s ease, background-color 0.3s ease !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-lead-form {
        margin-top: 3rem;
    }
    
    .stats-section .row {
        justify-content: center;
    }
    
    .stat-card {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 140px 0 60px;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
        line-height: 1.6;
    }
    
    .stat-card .stat-number {
        font-size: 2.8rem;
    }
    
    .contact-form {
        padding: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .hero-lead-form {
        padding: 2rem;
        margin-top: 2rem;
        z-index: 10;
        position: relative;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    .hero-lead-form h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-lead-form p {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-lead-form .form-control {
        padding: 12px 16px;
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
        position: relative;
        z-index: 1;
        touch-action: manipulation;
    }
    
    .hero-lead-form form {
        position: relative;
        z-index: 1;
    }
    
    .stats-section {
        padding: 60px 0;
        margin-top: -40px;
    }
    
    .service-card,
    .portfolio-card,
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.75rem;
    }
    
    .lead-cta-inline {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .row.g-4 {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
    
    .row.g-4 > * {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        margin-top: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem !important;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 !important;
        display: block;
    }
    
    .hero-trust-indicators {
        margin-top: 1.5rem !important;
    }
    
    .hero-trust-indicators .d-flex {
        flex-direction: column;
        gap: 0.75rem !important;
        align-items: flex-start !important;
    }
    
    /* Ensure proper spacing between sections */
    .section + .section {
        margin-top: 0;
    }
    
    /* Blog Detail Page Mobile */
    .blog-content {
        font-size: 1rem;
    }
    
    .blog-content h1,
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.3rem;
    }
    
    .ps-lg-4 {
        padding-left: 0 !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 100px 0 50px;
        transform: none !important;
        -webkit-transform: none !important;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        line-height: 1.6;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .btn-primary-custom,
    .btn-outline-custom,
    .cta-button {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.25rem !important;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 !important;
        padding: 12px 20px;
        font-size: 0.95rem;
        display: block;
    }
    
    .hero-trust-indicators {
        margin-top: 1.25rem !important;
    }
    
    .hero-trust-indicators .d-flex {
        flex-direction: column;
        gap: 0.625rem !important;
        align-items: flex-start !important;
    }
    
    .hero-trust-indicators span {
        font-size: 0.9rem;
    }
    
    .hero-lead-form {
        padding: 1.5rem;
        margin-top: 1.5rem;
        border-radius: 15px;
    }
    
    .hero-lead-form h3 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-lead-form p {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .hero-lead-form .form-control {
        padding: 11px 14px;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        border-radius: 10px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        position: relative;
        z-index: 1;
        touch-action: manipulation;
    }
    
    .hero-lead-form .btn-submit {
        padding: 12px;
        font-size: 1rem;
        position: relative;
        z-index: 1;
        touch-action: manipulation;
    }
    
    .hero-lead-form form {
        position: relative;
        z-index: 1;
    }
    
    .hero-lead-form * {
        pointer-events: auto;
    }
    
    .lead-form-benefits {
        margin-top: 0.875rem;
    }
    
    .lead-form-benefits li {
        font-size: 0.85rem;
        padding: 0.25rem 0;
    }
    
    .stats-section {
        padding: 50px 0;
        margin-top: -30px;
    }
    
    .stat-card {
        margin-bottom: 1.25rem;
        padding: 2rem 1.5rem;
    }
    
    .stat-card i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-card .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-card .stat-label {
        font-size: 0.85rem;
    }
    
    .service-card {
        padding: 1.75rem 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .service-card i {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .service-card h4 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    .portfolio-card-body,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .portfolio-card h5 {
        font-size: 1.2rem;
    }
    
    .testimonial-card {
        padding: 1.75rem 1.5rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .lead-cta-section {
        padding: 50px 0;
    }
    
    .lead-cta-section h2 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .lead-cta-section p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    .lead-cta-inline {
        padding: 1.25rem;
        margin: 1.25rem auto;
    }
    
    .lead-cta-inline h4 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .lead-cta-inline p {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .row.g-4 {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .row.g-4 > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        margin-top: 0.75rem;
    }
    
    /* Ensure form inputs are always clickable */
    input, select, textarea, button {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Better spacing for mobile sections */
    .section {
        overflow: visible;
    }
    
    /* Fix for mobile form accessibility */
    .hero-section {
        min-height: auto;
    }
    
    .hero-lead-form {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }
}

@media (max-width: 576px) {
    html {
        scroll-padding-top: 70px;
    }
    
    /* Blog Detail Page Mobile */
    .hero-section {
        padding: 120px 0 60px !important;
    }
    
    .blog-content {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    .blog-content h1,
    .blog-content h2 {
        font-size: 1.4rem;
        margin-top: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
        margin-top: 1.25rem;
    }
    
    .blog-content p {
        margin-bottom: 1.25rem;
    }
    
    .ps-lg-4 {
        padding-left: 0 !important;
        margin-top: 2rem;
    }
    
    .card.shadow-custom {
        margin-bottom: 1.5rem;
    }
    
    /* Disable sticky sidebar on mobile */
    .blog-sidebar-wrapper {
        position: relative;
        top: auto;
    }
}

/* Blog Styles */
/* Sticky Sidebar - CRITICAL: Match exact structure from working blogs.php */
.blog-content-section {
    position: relative !important;
    overflow: visible !important;
    padding: 60px 0;
}

.blog-content-section .container {
    position: relative !important;
    overflow: visible !important;
}

.blog-content-section .row {
    position: relative !important;
    align-items: flex-start !important;
    overflow: visible !important;
    display: flex !important;
    margin-left: 0;
    margin-right: 0;
}

.blog-content-section .col-lg-4 {
    overflow: visible !important;
    position: relative !important;
}

/* Base sticky sidebar rule - applies to all pages */
.blog-sidebar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    align-self: flex-start !important;
    transition: top 0.3s ease;
    will-change: top;
    height: fit-content !important;
    max-height: none !important;
    z-index: 10 !important;
    margin-bottom: 2rem;
}

/* Ensure blog detail page sidebar matches blogs listing page exactly */
.blog-content-section .blog-sidebar-wrapper,
.section.blog-content-section .blog-sidebar-wrapper {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    align-self: flex-start !important;
}

/* Adjust sticky position when navbar is scrolled */
#mainNav.scrolled ~ * .blog-sidebar-wrapper,
body:has(#mainNav.scrolled) .blog-sidebar-wrapper,
.blog-sidebar-wrapper.navbar-scrolled {
    top: 80px;
}

/* Sticky sidebar for blogs listing page */
.portfolio-section {
    position: relative;
    overflow: visible !important;
}

.portfolio-section .container {
    overflow: visible !important;
}

.portfolio-section .row {
    overflow: visible !important;
    display: flex;
}

.portfolio-section .blog-sidebar-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

/* Disable sticky on mobile */
@media (max-width: 992px) {
    .blog-sidebar-wrapper {
        position: relative !important;
        top: auto !important;
    }
    
    .blog-content-section {
        min-height: auto;
    }
}


.blog-content h1,
.blog-content h2 {
    color: var(--dark-navy);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content h3 {
    color: var(--dark-navy);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
    line-height: 1.9;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.blog-content a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.blog-content a:hover {
    color: var(--accent-coral);
}

.bg-coral {
    background: var(--accent-coral) !important;
}

/* Utility Classes */
.text-coral {
    color: var(--accent-coral) !important;
}

.bg-pale-blue {
    background: var(--pale-blue) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-lg) !important;
}
