/* Custom Properties (Variables) */
:root {
    --primary: #6366f1;
    /* Indigo */
    --secondary: #a855f7;
    /* Purple */
    --accent: #ec4899;
    /* Pink */

    --bg-black: #050505;
    --bg-darker: #0a0a0c;
    --bg-dark: #121215;
    --bg-card: rgba(25, 25, 30, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.03);
}

/* Custom Scrollbar Design (Brand Optimized) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 20px;
    border: 2px solid var(--bg-black);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--accent));
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-black);
}

/* Global Styles */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

/* Typography & Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    background-size: 300% auto;
    animation: gradientTextAnim 5s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary);
    /* Fallback for browsers that don't support background-clip: text */
    display: inline-block;
}

@keyframes gradientTextAnim {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}

/* Fix for icons with text-gradient on mobile */
i.text-gradient {
    display: inline-block !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    transform: translateZ(0);
    /* Force hardware acceleration for mobile Safari */
    -webkit-transform: translateZ(0);
    vertical-align: middle;
    line-height: inherit;
    width: auto;
    height: auto;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.bg-gradient-line {
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.bg-black {
    background-color: var(--bg-black);
}

.border-top-dark {
    border-top: 1px solid var(--glass-border);
}

.section-padding {
    padding-top: 100px;
    padding-bottom: 100px;
    overflow: hidden;
}

/* Buttons */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #fff;
    transition: all 0.3s;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Glassmorphism - Optimized with Hardware Acceleration */
.bg-glass,
.glass-card {
    background: var(--bg-card) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    isolation: isolate;
    transform: translateZ(0); 
}

/* Navbar */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px 0;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-dark .navbar-nav .nav-link,
.navbar .navbar-nav .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #fff;
}

.navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Mobile Icon Tweak */
.navbar-toggler {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-content-centered {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-glow-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150vw; 
    height: 150vh;
    background: conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(99, 102, 241, 0.2) 45deg,
        transparent 90deg,
        rgba(168, 85, 247, 0.15) 180deg,
        transparent 225deg,
        rgba(236, 72, 153, 0.2) 315deg,
        transparent 360deg
    );
    z-index: -1;
    filter: blur(100px); 
    pointer-events: none;
    animation: rotate-glow 20s infinite linear;
    mix-blend-mode: screen;
    opacity: 0.7;
    will-change: transform;
}

@keyframes rotate-glow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes mesh-morph {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 60%;
    }

    50% {
        transform: translate(-45%, -55%) rotate(10deg) scale(1.1);
        border-radius: 70% 30% 50% 50% / 30% 70% 40% 60%;
    }

    100% {
        transform: translate(-55%, -45%) rotate(-10deg) scale(1);
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 60%;
    }
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.mouse-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    filter: blur(60px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
    animation: drift 15s infinite alternate ease-in-out;
}

.mouse-orb-secondary {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.1;
    animation: drift 15s infinite alternate-reverse ease-in-out, morph 12s infinite alternate ease-in-out;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 80px) scale(0.9);
    }

    100% {
        transform: translate(30px, -20px) scale(1);
    }
}

.hero-image-wrapper {
    max-width: 500px;
}

.hero-glass-panel {
    position: absolute;
    bottom: -20px;
    left: -30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 2;
    animation: float-small 4s infinite ease-in-out alternate;
}

@keyframes float-small {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Services */
.service-card {
    transition: all 0.4s ease;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover .icon-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: scale(1.1) rotate(5deg);
}

/* Workflow Stacking Cards */
#process .card {
    position: sticky;
    top: 150px;
    margin-bottom: 20px;
    /* Space between cards when they stack */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#process .card:nth-child(1) {
    top: 100px;
    z-index: 1;
}

#process .card:nth-child(2) {
    top: 130px;
    z-index: 2;
}

#process .card:nth-child(3) {
    top: 160px;
    z-index: 3;
}

#process .card:nth-child(4) {
    top: 190px;
    z-index: 4;
}

#process .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 10 !important;
}

/* Tech Stack Tabs Active Styling */
#tech-stack .nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

#tech-stack .nav-pills .nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Industries Section Tabs Styling */
#industries .nav-pills .nav-link {
    transition: all 0.3s ease;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

#industries .nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--accent), var(--secondary)) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 25px rgba(236, 72, 153, 0.3);
    transform: translateX(10px);
}

#industries .nav-pills .nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Tech Stack Cards Custom Glow Shadow */
#tech-stack .tab-pane .card {
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#tech-stack .tab-pane .card:hover {
    transform: translateY(-5px);
    background: rgba(99, 102, 241, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.2);
}

/* Why Us */
.benefit-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pricing */
.pricing-card {
    border-radius: 24px;
    transition: all 0.4s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 26px;
    z-index: -1;
}

.pricing-card.featured .card-body {
    background: var(--bg-dark);
    border-radius: 24px;
    height: 100%;
}

.popular-badge {
    transform: translateY(-50%) translateX(-50%) !important;
    z-index: 10;
}

.feature-list li {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 15px;
}

/* Portfolio */
.portfolio-item {
    cursor: pointer;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: all 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item img {
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.image-border-glow {
    position: absolute;
    top: -15px;
    left: -15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--primary);
    border-radius: 20px;
    opacity: 0.3;
    z-index: -1;
    animation: drift 10s infinite alternate ease-in-out;
}

.contact-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Forms */
.form-control {
    font-size: 15px;
}

.form-control:focus {
    background-color: #1a1a1f;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
    color: #fff;
}

.form-floating>label {
    color: var(--text-muted) !important;
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.social-icon {
    width: 45px;
    height: 45px;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    transform: translateY(-5px) rotate(8deg);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-links a:hover {
    color: var(--primary) !important;
    transform: translateX(8px);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    opacity: 1;
    left: -20px;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-black);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.spinner-border.text-primary {
    color: var(--primary) !important;
}

/* Scroll To Top */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: none;
    color: white;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

/* Hero Visual Animations */
.floating-anim {
    animation: floating 6s ease-in-out infinite;
}

.floating-anim-delayed {
    animation: floating 6s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes floating {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.bg-gradient-brand {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

@media (max-width: 991px) {
    .navbar {
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        padding: 10px 0;
        /* Reduced padding */
    }

    .navbar-brand img {
        height: 50px !important;
        /* Smaller logo on mobile */
        max-width: 240px;
        object-fit: contain;
    }

    .navbar-toggler {
        padding: 4px 6px;
        /* Slightly tighter padding */
    }

    .navbar-toggler i {
        font-size: 1.4rem !important;
        /* Slightly smaller toggle icon */
    }

    /* Extra small screen fixes (e.g. 280px) */
    @media (max-width: 350px) {
        .navbar-brand img {
            height: 40px !important;
            max-width: 110px;
        }

        .navbar-toggler i {
            font-size: 1.2rem !important;
        }

        .navbar .container {
            padding-left: 10px;
            padding-right: 10px;
        }
    }

    .navbar-collapse {
        background: var(--bg-dark);
        padding: 20px;
        border-radius: 12px;
        margin-top: 15px;
        border: 1px solid var(--glass-border);
    }

    /* Prevent navbar from covering hero title/badge on mobile */
    .hero-section {
        padding-top: 80px;
    }
}

.overflow-visible {
    overflow: visible !important;
}

/* Morphing Banner Section */
.cta-banner {
    background-color: #050505;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.morph-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.morph-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    animation: morph 15s infinite alternate ease-in-out, drift 25s infinite alternate ease-in-out;
}

.cta-banner .blob-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    left: -100px;
    background: var(--primary);
}

.cta-banner .blob-2 {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -100px;
    background: var(--accent);
    animation-delay: -5s;
}

.cta-banner .blob-3 {
    width: 300px;
    height: 300px;
    top: 20%;
    right: 20%;
    background: var(--secondary);
    opacity: 0.1;
    animation-duration: 20s;
}

/* Contact & Secondary Section Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    animation: morph 12s infinite alternate ease-in-out, drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    background: var(--primary);
}

.blob-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -100px;
    background: var(--accent);
    animation-delay: -3s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    top: 10%;
    right: -100px;
    background: var(--secondary);
}

.btn-white {
    background: #fff;
    color: #000;
    border: 1px solid #fff;
    transition: all 0.3s ease;
}

.btn-white:hover {
    background: transparent;
    color: #fff;
    transform: translateY(-3px);
}

/* WhatsApp Floating Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 20px;
    /* Position on bottom left to avoid clashing with up arrow */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background-color: #20b355;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

@media (max-width: 576px) {
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 26px;
        bottom: 20px;
        left: 15px;
    }
}

/* Promo Animated Glow Border */
.promo-glow-wrapper {
    position: relative;
    padding: 3px;
    border-radius: 17px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
}

.promo-glow-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, transparent 60%, rgba(255, 255, 255, 0.4) 75%, #ffffff 85%, transparent 100%);
    animation: rotate-glow 3s linear infinite;
    z-index: 0;
}

.promo-inner {
    position: relative;
    background: var(--bg-darker);
    border-radius: 15px;
    z-index: 1;
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Typography */
@media (max-width: 991px) {
    .display-1 {
        font-size: 3.5rem !important;
    }

    .display-2 {
        font-size: 3rem !important;
    }

    .display-5 {
        font-size: 2.2rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 768px) {
    .display-1 {
        font-size: 2.8rem !important;
    }

    .display-5 {
        font-size: 1.8rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    .section-padding {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

@media (max-width: 576px) {
    .display-1 {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .display-5 {
        font-size: 1.6rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h4 {
        font-size: 1.2rem !important;
    }

    p,
    .text-secondary {
        font-size: 0.95rem !important;
    }

    .btn {
        padding: 12px 24px !important;
        font-size: 0.9rem !important;
    }

    /* Targeted Padding for Methodology Section Only */
    #process .card {
        padding: 24px !important;
        margin-bottom: 20px !important;
    }

    section#process {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
}

/* Laptop & Desktop Optimization (UI Guidelines) */
@media (min-width: 992px) {
    .container {
        max-width: 1320px !important;
    }

    .display-1 {
        font-size: 5rem !important;
    }

    .display-5 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.5rem !important;
    }

    p, .lead {
        font-size: 1.2rem !important;
    }
}

/* Specific scaling for standard 13-15" laptops */
@media (min-width: 992px) and (max-width: 1440px) {
    .display-1 {
        font-size: 4.2rem !important;
    }
}

/* Extra Wide Screen Optimization */
@media (min-width: 1400px) {
    .display-1 {
        font-size: 4.8rem !important;
    }
    
    .display-1 br {
        display: block !important;
    }
}

/* Optimization for iOS/iPhone text rendering */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-text-size-adjust: 100%;
    }
}