/* --- Modern Facelift for NGDA Website --- */

/* Universal box-sizing and overflow prevention */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Body & Typography */
body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(120deg, #e0e7ef 0%, #f8fafc 100%);
    color: #22223b;
    letter-spacing: 0.01em;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Headings */
h1, h2, h3 {
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -1px;
}
h1 {
    font-size: 2.7rem;
    margin-bottom: 1.2rem;
}
h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
h3 {
    font-size: 1.4rem;
    margin-bottom: 0.7rem;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #000 60%, #41d9fffa 100%);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    color: #fff;
    border-bottom: none;
    min-height: 60px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}
.navbar-brand,
.navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}
.navbar-nav .nav-link:hover {
    color: #41d9fffa !important;
}
.navbar-toggler {
    background-color: #41d9fffa;
    border: none;
}

/* Cards */
.card {
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12), 0 1.5px 4px rgba(44, 62, 80, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    background: rgba(255,255,255,0.98);
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}
.card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 16px 40px rgba(44, 62, 80, 0.18), 0 3px 8px rgba(44, 62, 80, 0.12);
}

/* Buttons */
.btn-primary, .btn-outline-primary {
    background: linear-gradient(90deg, #41d9fffa 0%, #36db67 100%);
    border: none;
    color: #fff !important;
    font-weight: 600;
    border-radius: 24px;
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 8px rgba(65,217,255,0.15);
    transition: background 0.3s, transform 0.2s, color 0.2s;
}
.btn-primary:hover, .btn-outline-primary:hover {
    background: linear-gradient(90deg, #36db67 0%, #41d9fffa 100%);
    color: #fff !important;
    transform: translateY(-2px) scale(1.04);
}

/* Forms */
.form-control {
    border-radius: 12px;
    border-color: #D1D5DB;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1.1rem;
}
.form-control:focus {
    border-color: #41d9fffa;
    box-shadow: 0 0 0 0.2rem rgba(65,217,255,0.18);
}

/* Container */
.container {
    background-color: rgba(255,255,255,0.97);
    padding: 2.5rem 2rem;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.07);
    margin: 2.5rem auto;
}

/* Footer */
.footer-custom {
    background: linear-gradient(90deg, #000 60%, #41d9fffa 100%);
    color: #fff;
    border-top: none;
    min-height: 60px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}
.footer-logo img, .ngda-logo-footer {
    height: 128px; /* Increased from 48px to 128px */
    margin-bottom: 0;
}
.footer-slogan {
    flex-grow: 1;
    text-align: center;
    font-size: 1rem;
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}
.social-icon {
    color: #fff;
    font-size: 2rem;
    transition: color 0.2s, transform 0.2s;
}
.social-icon:hover {
    color: #41d9fffa;
    transform: scale(1.15);
}

/* List Items */
.list-group-item {
    border-color: #D1D5DB;
    background-color: #fff;
    color: #22223b;
    font-weight: 600;
    font-size: 1.08rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}
.list-group-item:hover {
    background-color: #e6f0fa;
}

/* Links */
a {
    color: #41d9fffa;
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: #36db67;
    text-decoration: underline;
}

/* Alerts */
.alert {
    border-radius: 12px;
    font-size: 1.08rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }
    
    .navbar {
        flex-direction: column;
        padding: 1rem 0.5rem;
    }
    .navbar-brand img {
        height: 44px !important;
    }
    .container {
        padding: 1.2rem 0.5rem;
        max-width: 100%;
        width: 100%;
        overflow: visible;
        margin: 0 auto;
        box-sizing: border-box;
    }
    .footer-custom {
        flex-direction: column;
        padding: 1rem 0.5rem;
    }
    .footer-logo img, .ngda-logo-footer {
        height: 88px; /* Increased from 36px to 88px for better mobile visibility */
    }

    .footer-social {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    }
    .social-icon {
        color: #ffffff;
        font-size: 2rem;
        transition: color 0.2s, transform 0.2s;
    }
    .social-icon:hover {
        color: #41d9fffa;
        transform: scale(1.15);
    }

    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.3rem;
    }
}

/* --- Backgrounds (keep your existing background classes) --- */
/* ...existing background CSS... */

/* Backgrounds for Pages */
.home-background,
.about-background,
.services-background,
.portfolio-background,
.portfolio-data-pipeline-background,
.portfolio-platform-migration-background,
.portfolio-data-platform-background,
.portfolio-AI-background,
.contact-background {
    background-size: contain;
    background-position: center;
    background-attachment: scroll;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 3rem 0;
}

/* Desktop (default) */
/* Home page now uses card-based layout instead of background image */
.about-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-about.webp');
}
.services-background {
    /* background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/NGDA-Tech-page.webp'); */
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-services.webp');
}
.portfolio-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-portfolio.webp');
}
.portfolio-AI-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/NGDA-AI-page.webp');
}
.portfolio-data-pipeline-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-data-pipeline2.webp');    
}
.portfolio-platform-migration-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-platform-migration.webp');    
}
.portfolio-data-platform-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-data-platform.webp');    
}
.contact-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-data-platform.webp');
}

/* Mobile override */
@media (max-width: 768px) {
    .portfolio-background {
        background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-portfolio-mobile.webp');
    }
    .portfolio-data-pipeline-background {
        background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-data-pipeline-mobile.webp');
    }
    .portfolio-platform-migration-background {
        background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-platform-migration-mobile.webp');
    }
    .portfolio-data-platform-background {
        background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-data-platform-mobile.webp');
    }
    .portfolio-AI-background {
        background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-predictive-analytics-mobile2.webp');
    }
    .services-background {    
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-services-mobile.webp');
    }
    .about-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-empowering-mobile.webp');
    }
    .contact-background {
    background-image: linear-gradient(rgba(230,240,250,0.2), rgba(230,240,250,0.2)), url('/static/img/Gemini-contact-mobile.webp');
    }    

}

/* Content Container on Backgrounds */
.about-background .container,
.services-background .container,
.portfolio-background .container,
.portfolio-data-pipeline-background .container,
.portfolio-platform-migration-background .container,
.portfolio-data-platform-background .container,
.portfolio-AI-background .container,
.contact-background .container {
    background-color: rgba(255,255,255,0.95);
    border-radius: 12px;
    padding: 2.5rem;    
}

/* Adjust text for contrast on backgrounds */
.about-background h1, .about-background p,
.services-background h1, .services-background p,
.portfolio-background h1, .portfolio-background p,
.portfolio-data-pipeline-background h1, .portfolio-data-pipeline-background p,
.portfolio-platform-migration-background h1, .portfolio-platform-migration-background p,
.portfolio-data-platform-background h1, .portfolio-data-platform-background p,
.portfolio-AI-background h1, .portfolio-AI-background p,
.contact-background h1, .contact-background p {
    color: #000;
}

/* --- Home Page Styles --- */
.home-hero-section {
    padding: 3rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(65,217,255,0.1) 0%, rgba(54,219,103,0.1) 100%);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.hero-buttons .btn {
    min-width: 200px;
}

.home-main-sections {
    gap: 4rem;
}

.home-services-card,
.home-values-card,
.home-cta-card {
    background: rgba(255,255,255,0.98);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.15), 0 2px 8px rgba(44, 62, 80, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
}

.home-services-card:hover,
.home-values-card:hover,
.home-cta-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.20), 0 4px 12px rgba(44, 62, 80, 0.12);
}

/* Service Icons & Content */
.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    border-radius: 20px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(65,217,255,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(65,217,255,0.4);
}

.service-icon i {
    color: #fff;
    font-size: 2rem;
}

.service-title {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-link {
    color: #41d9fffa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.service-link:hover {
    color: #36db67;
    text-decoration: none;
}

/* Value Items */
.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.value-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(65,217,255,0.25);
}

.value-icon i {
    color: #fff;
    font-size: 1.2rem;
}

.value-title {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.value-text {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Stats Container */
.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA Section */
.home-cta-card {
    background: linear-gradient(135deg, rgba(65,217,255,0.05) 0%, rgba(54,219,103,0.05) 100%);
    border: 2px solid rgba(65,217,255,0.1);
}

.cta-buttons .btn {
    min-width: 180px;
}

.contact-quick-info {
    padding-top: 1.5rem;
    border-top: 2px solid rgba(65,217,255,0.1);
}

.contact-quick-info a {
    color: #41d9fffa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.contact-quick-info a:hover {
    color: #36db67;
    text-decoration: underline;
}

.contact-quick-info i {
    color: #41d9fffa;
}

/* --- Contact Page Styles --- */
.contact-hero-section {
    padding: 2rem 0;
    text-align: center;
}

.contact-info-card,
.contact-form-card {
    background: rgba(255,255,255,0.98);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12), 0 1.5px 4px rgba(44, 62, 80, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.contact-info-card:hover,
.contact-form-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(44, 62, 80, 0.18), 0 3px 8px rgba(44, 62, 80, 0.12);
}

.contact-item {
    padding: 1rem 0;
}

.contact-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(65,217,255,0.25);
}

.contact-icon {
    color: #fff;
    font-size: 1.2rem;
}

.contact-item-title {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.contact-item-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22223b;
    margin-bottom: 0.25rem;
}

.contact-item-subtitle {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.contact-link {
    color: #41d9fffa;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #36db67;
    text-decoration: underline;
}

.social-connect {
    margin-top: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    color: #fff;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-2px) scale(1.05);
    color: #fff;
    box-shadow: 0 6px 20px rgba(65,217,255,0.3);
}

/* Contact Form Styles */
.contact-form .form-floating {
    margin-bottom: 0.5rem;
}

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

.contact-form .form-control:focus {
    border-color: #41d9fffa;
    box-shadow: 0 0 0 0.25rem rgba(65,217,255,0.15);
}

.contact-form .message-textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form label {
    color: #6c757d;
    font-weight: 500;
}

.contact-form .form-control:focus + label,
.contact-form .form-control:not(:placeholder-shown) + label {
    color: #41d9fffa;
}

/* Why Choose Us Section */
.why-choose-section {
    background: rgba(255,255,255,0.98);
    border-radius: 18px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.12);
    margin-top: 0;
    margin-bottom: 0;
}

/* Override Bootstrap margin utilities for consistent spacing */
.contact-main-sections .col-12.mt-5,
.contact-main-sections .row.mt-5 {
    margin-top: 0 !important;
}

/* Desktop: Stack main sections vertically */
@media (min-width: 769px) {
    .contact-main-sections {
        flex-direction: column;
        gap: 3rem;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-main-sections .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0;
        margin-top: 0;
    }
    
    /* Contact Information - Horizontal Layout on Desktop */
    .contact-info-card .contact-items-container {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-info-card .contact-item {
        flex: 1;
        min-width: 200px;
        max-width: 250px;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    .contact-info-card .social-connect {
        flex: 0 0 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
        width: 100%;
        max-width: 100%;
    }
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #41d9fffa 0%, #36db67 100%);
    border-radius: 16px;
    margin: 0 auto;
    box-shadow: 0 6px 20px rgba(65,217,255,0.25);
}

.feature-icon i {
    color: #fff;
    font-size: 1.8rem;
}

.why-choose-section h5 {
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
}

/* Animation Enhancements */
.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(65,217,255,0.3);
}

/* Responsive Adjustments for Contact Page */
@media (max-width: 768px) {
    .contact-info-card,
    .contact-form-card,
    .why-choose-section {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
        margin: 0 auto;
    }
    
    .contact-hero-section {
        padding: 1rem 0;
        width: 100%;
        overflow: visible;
        text-align: center;
        margin: 0 auto;
    }
    
    .contact-hero-section h1 {
        font-size: 2rem;
    }
    
    .social-links {
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        box-sizing: border-box;
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto 1rem auto;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .contact-form .d-grid.gap-2.d-md-flex {
        flex-direction: column;
        width: 100%;
    }
    
    .contact-form .btn {
        margin-bottom: 0.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    /* Mobile: Keep main sections in mobile layout */
    .contact-main-sections {
        flex-direction: column !important;
        gap: 3rem !important;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        margin: 0 auto;
        padding: 0;
    }
    
    .contact-main-sections .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box;
    }
    
    /* Home Page Mobile Styles */
    .home-hero-section {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .home-hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        min-width: auto;
    }
    
    .home-services-card,
    .home-values-card,
    .home-cta-card {
        padding: 2rem 1.5rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .home-main-sections {
        gap: 2.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }
    
    .service-icon i {
        font-size: 1.8rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .value-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .value-icon {
        margin: 0 auto;
    }
    
    .contact-quick-info {
        margin-top: 2rem;
    }
    
    .contact-quick-info p {
        font-size: 0.95rem;
    }

    /* Mobile: Stack contact items vertically */
    .contact-info-card .contact-items-container {
        display: block !important;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        margin: 0 auto;
        text-align: center;
    }
    
    .contact-info-card .contact-item {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 auto 1.5rem auto !important;
        padding: 0 !important;
        box-sizing: border-box;
        text-align: center;
    }
    
    .contact-info-card .social-connect {
        margin: 2rem auto 0 auto !important;
        padding-top: 2rem !important;
        border-top: 1px solid #e9ecef !important;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }
    
    /* Ensure form elements don't overflow and are centered */
    .contact-form {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        overflow: visible;
    }
    
    .contact-form .form-control,
    .contact-form .form-floating {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-form .row.g-3 {
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }
    
    .contact-form .col-md-6 {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem 0;
        margin: 0;
    }
    
    /* Ensure Bootstrap grid doesn't cause overflow on mobile */
    .row {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    .col-12, .col-md-6, .col-md-4 {
        width: 100%;
        max-width: 100%;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        box-sizing: border-box;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container,
    .about-background .container,
    .services-background .container,
    .portfolio-background .container,
    .portfolio-data-pipeline-background .container,
    .portfolio-platform-migration-background .container,
    .portfolio-data-platform-background .container,
    .portfolio-AI-background .container,
    .contact-background .container {
        padding: 1.5rem;
        margin: 0 auto;
        overflow: visible;
    }
    
    /* Keep text content left-aligned on mobile for readability */
    .container ul,
    .container ol,
    .container p:not(.lead),
    .container div:not([class*="text-center"]):not([class*="hero"]):not([class*="cta"]) {
        text-align: left;
    }
    
    /* Center only specific elements that should be centered on mobile */
    .container .text-center,
    .container .btn {
        text-align: center;
    }
    
    /* Left-align headings and leads on main content pages */
    .about-background h1, .about-background .lead,
    .services-background h1, .services-background .lead,
    .portfolio-background h1, .portfolio-background .lead {
        text-align: left;
    }
    
    /* Center home page and contact page elements */
    .home-hero-section h1, .home-hero-section .lead,
    .contact-hero-section h1, .contact-hero-section .lead,
    .home-cta-card h1, .home-cta-card .lead {
        text-align: center;
    }
    .about-background,
    .services-background,
    .portfolio-background,
    .portfolio-data-pipeline-background,
    .portfolio-platform-migration-background,
    .portfolio-data-platform-background,
    .portfolio-AI-background,
    .contact-background {
        background-attachment: scroll;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;        
    }
}