/* ===========================
   CSS Variables for Theming
   =========================== */
   :root {
    /* Brand Colors */
    --brand-primary: #0073A4;
    --brand-primary-dark: #005782;
    --brand-primary-light: #0091CC;
    
    /* Light Theme Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FA;
    
    --text-primary: #1A1A1A;
    --text-secondary: #4A5568;
    --text-tertiary: #718096;
    --text-inverse: #FFFFFF;
    
    --border-color: #E2E8F0;
    --border-color-hover: #CBD5E0;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    /* Hero Overlay */
    --hero-overlay: linear-gradient(135deg, rgba(0, 35, 75, 0.92) 0%, rgba(0, 115, 164, 0.85) 100%);
    
    /* Section Backgrounds */
    --section-bg-alt: #F7FAFC;
    --section-gradient: linear-gradient(135deg, #F7FAFC 0%, #EDF2F7 100%);
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    
    /* Spacing */
    --section-padding: clamp(4rem, 8vw, 8rem);
    --card-padding: clamp(1.5rem, 3vw, 2.5rem);
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;
    
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;
    --text-inverse: #0F172A;
    
    --border-color: #334155;
    --border-color-hover: #475569;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6);
    
    --hero-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(0, 115, 164, 0.90) 100%);
    
    --section-bg-alt: #1E293B;
    --section-gradient: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

/* ===========================
   Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow on all elements */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    max-width: 100vw;
    position: relative;
}

/* Fix Bootstrap grid overflow */
.container,
.container-fluid {
    overflow-x: hidden;
    max-width: 100%;
}

.row {
    margin-left: -12px;
    margin-right: -12px;
    max-width: 100%;
}

.row > * {
    padding-left: 12px;
    padding-right: 12px;
}

img, video, iframe, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.lead {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.7;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 23, 42, 0.95);
}

/* Hamburger Menu Icon */
.navbar-toggler {
    border: 2px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 115, 164, 0.2);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2874, 85, 104, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28241, 245, 249, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .navbar-toggler {
    border-color: var(--border-color);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--brand-primary);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-text {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 575px) {
    .brand-text {
        font-size: 0.9rem;
    }
    
    /* Hide scroll indicator on mobile - not needed for touch devices */
    .scroll-indicator {
        display: none;
    }
}

/* Extra small devices - prevent brand text overflow */
@media (max-width: 350px) {
    .brand-text {
        font-size: 0.75rem;
        white-space: normal;
        line-height: 1.2;
        max-width: 140px;
    }
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--brand-primary);
}

/* Hover color in dark mode */
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--brand-primary);
    font-weight: 600;
}

/* Active link color in dark mode */
[data-theme="dark"] .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    position: relative;
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--brand-primary);
}

.theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: inline-block;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-primary {
    background: transparent;
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
}

.btn-outline-primary:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height - better for mobile browsers */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 0 4rem;
    width: 100%;
    max-width: 100vw;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 0;
    max-width: 100vw;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.hero-background.loaded {
    opacity: 1;
}

/* Loading placeholder for hero */
.hero-background:not(.loaded) {
    background: linear-gradient(135deg, rgba(0, 35, 75, 0.3) 0%, rgba(0, 115, 164, 0.3) 100%);
}

/* Fix for mobile devices - fixed attachment doesn't work well on iOS/touch devices */
@media (max-width: 767px) {
    .hero-background {
        background-attachment: scroll !important;
    }
}

[data-theme="dark"] .hero-background {
    filter: brightness(0.7);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    padding: 2rem 1rem;
}

.hero-title {
    color: white;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 2rem;
    max-width: 600px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===========================
   Section Styles
   =========================== */
.section-padding {
    padding: var(--section-padding) 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

section {
    overflow-x: hidden;
    max-width: 100vw;
}

.section-header {
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(0, 115, 164, 0.1);
    color: var(--brand-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================
   Services Section
   =========================== */
.services-section {
    background: var(--bg-secondary);
}

.service-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: var(--card-padding);
    height: 100%;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 115, 164, 0.1), rgba(0, 115, 164, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-base);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.service-link:hover {
    gap: 1rem;
}

/* ===========================
   DevOps Excellence Section
   =========================== */
.devops-excellence-section {
    background: var(--section-gradient);
}

.feature-block {
    padding-left: 1.5rem;
    border-left: 3px solid var(--brand-primary);
}

.feature-block h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(0, 115, 164, 0.1), rgba(0, 115, 164, 0.2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-primary);
    margin-bottom: 1rem;
}

.feature-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* ===========================
   Leadership Section
   =========================== */
.leadership-section {
    background: var(--bg-primary);
}

.leader-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.leader-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    filter: grayscale(20%);
    transition: var(--transition-base);
}

.leader-image-wrapper:hover .leader-image {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.leader-badge {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(0, 115, 164, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.leader-badge h4 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.leader-social {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
}

.social-link:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-3px);
}

.leader-content {
    padding: 2rem 0;
}

.quote-icon {
    font-size: 3rem;
    color: var(--brand-primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.leader-quote {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.leader-text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.value-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--brand-primary);
    transition: var(--transition-base);
}

.value-card:hover {
    background: var(--bg-card-hover);
    transform: translateX(5px);
}

.value-card h5 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.value-card i {
    color: var(--brand-primary);
}

.value-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===========================
   Section Background & Overlay
   =========================== */
.section-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    will-change: opacity;
}

.section-background.loaded {
    opacity: 1;
}

/* Disable fixed attachment on mobile for better performance */
@media (max-width: 991px) {
    .section-background {
        background-attachment: scroll;
    }
}

.section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.92) 100%);
    z-index: 1;
}

[data-theme="light"] .section-overlay {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.96) 0%, rgba(240, 242, 245, 0.94) 100%);
}

/* Loading placeholder for backgrounds */
.section-background:not(.loaded) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, rgba(30, 41, 59, 0.3) 100%);
}

[data-theme="light"] .section-background:not(.loaded) {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.5) 0%, rgba(240, 242, 245, 0.5) 100%);
}

/* ===========================
   Expertise Section
   =========================== */
.expertise-section {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.expertise-section .container {
    position: relative;
    z-index: 2;
}

.expertise-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    height: 100%;
    text-align: center;
}

.expertise-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.expertise-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
    transition: var(--transition-base);
}

.expertise-card:hover .expertise-icon {
    transform: rotateY(360deg);
}

.expertise-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.expertise-card p {
    color: var(--text-secondary);
    margin: 0;
}

.expertise-detail-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-base);
    height: 100%;
}

.expertise-detail-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.expertise-detail-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 115, 164, 0.1), rgba(0, 115, 164, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--brand-primary);
}

.expertise-detail-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.expertise-detail-content p {
    color: var(--text-secondary);
    margin: 0;
}

/* ===========================
   Cloud Services Section
   =========================== */
.cloud-services-section {
    background: linear-gradient(135deg, #1E3A8A 0%, #0073A4 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cloud-services-section .section-overlay {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(0, 115, 164, 0.90) 100%);
}

[data-theme="dark"] .cloud-services-section .section-overlay {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(0, 115, 164, 0.93) 100%);
}

.cloud-services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.cloud-services-section .container {
    position: relative;
    z-index: 1;
}

.cloud-services-section .section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.cloud-services-section .section-title,
.cloud-services-section .lead {
    color: white;
}

.cloud-feature-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-base);
}

.cloud-feature-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.cloud-feature-badge i {
    font-size: 1.5rem;
}

.cloud-service-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition-base);
    height: 100%;
}

.cloud-service-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cloud-service-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.5rem;
}

.cloud-service-card h4 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cloud-service-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ===========================
   DevOps Section
   =========================== */
.devops-section {
    background: linear-gradient(135deg, #312E81 0%, #1E3A8A 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.devops-section .section-overlay {
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.93) 0%, rgba(30, 58, 138, 0.91) 100%);
}

[data-theme="dark"] .devops-section .section-overlay {
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.96) 0%, rgba(30, 58, 138, 0.94) 100%);
}

.devops-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.devops-section .container {
    position: relative;
    z-index: 1;
}

.devops-section .section-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.devops-section .section-title,
.devops-section .lead {
    color: white;
}

.devops-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-base);
}

.devops-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.devops-badge i {
    font-size: 1.25rem;
    color: #4ADE80;
}

.devops-detail-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-base);
    height: 100%;
}

.devops-detail-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.devops-detail-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.devops-detail-content h4 {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.devops-detail-content p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* ===========================
   Solutions Section
   =========================== */
.solutions-section {
    background: var(--bg-primary);
}

.solution-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 2rem;
    transition: var(--transition-base);
    height: 100%;
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.solution-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.solution-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.solution-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.05rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact-section {
    background: var(--section-gradient);
}

.contact-method-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-base);
    height: 100%;
}

.contact-method-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

.contact-method-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 115, 164, 0.1), rgba(0, 115, 164, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--brand-primary);
    margin: 0 auto 1.5rem;
}

.contact-method-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-method-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.contact-link {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-control {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.form-control:focus {
    background: var(--bg-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 164, 0.1);
    outline: none;
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===========================
   Scroll to Top Button
   =========================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-5px);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 991px) {
    .hero-section {
        min-height: 80vh;
        padding: 5rem 0 3rem;
    }

    .navbar-collapse {
        background: var(--bg-primary);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: var(--shadow-md);
    }

    [data-theme="dark"] .navbar-collapse {
        background: var(--bg-secondary);
    }

    .leader-image-wrapper {
        margin-bottom: 2rem;
    }

    .contact-form {
        padding: 2rem;
    }

    /* Prevent horizontal overflow */
    body, html {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .row {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }

    .row > * {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-section,
    section {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

@media (max-width: 767px) {
    .section-padding {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .service-card,
    .feature-card,
    .expertise-card {
        margin-bottom: 1rem;
    }

    .solution-card {
        flex-direction: column;
        text-align: center;
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    /* More aggressive contact form padding for small screens */
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .contact-method-card {
        padding: 1.5rem;
    }

    /* Fix horizontal overflow on mobile */
    body, html {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
        max-width: 100% !important;
    }

    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .brand-text {
        font-size: 1rem;
    }

    .hero-section,
    section {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    /* Fix any cards or elements that might overflow */
    .service-card,
    .feature-card,
    .expertise-card,
    .cloud-service-card,
    .devops-detail-card {
        max-width: 100%;
    }
}

/* ===========================
   4K & Ultra-Wide Optimization
   =========================== */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    .hero-content {
        max-width: 1600px;
    }

    .hero-title {
        max-width: 900px;
    }

    .hero-subtitle {
        max-width: 700px;
    }
}

/* ===========================
   Focus Styles (Accessibility)
   =========================== */
*:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
}

button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 3px;
}

/* ===========================
   Loading States
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===========================
   Global Overflow Prevention
   =========================== */
* {
    max-width: 100%;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

.container,
.container-fluid,
.row,
section,
div {
    max-width: 100%;
}

/* Ensure no element causes horizontal scroll */
nav, header, main, footer, article, aside {
    max-width: 100vw;
    overflow-x: hidden;
}

/* ===========================
   Touch Device Optimizations
   =========================== */
/* Disable hover effects on touch devices to prevent sticky states */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .feature-card:hover,
    .expertise-card:hover,
    .cloud-service-card:hover,
    .devops-detail-card:hover,
    .contact-method-card:hover {
        transform: none;
    }
    
    /* Keep focus visible for accessibility */
    .service-card:focus,
    .feature-card:focus,
    .expertise-card:focus {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }
}

/* Ensure minimum touch target size (44x44px) */
@media (max-width: 767px) {
    .btn,
    .btn-icon,
    .navbar-toggler {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ===========================
   Additional Small Screen Fixes
   =========================== */
@media (max-width: 575px) {
    /* Reduce section padding more on very small screens */
    .section-padding {
        padding: 2.5rem 0;
    }
    
    /* Adjust service card icon size */
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    /* Improve DevOps detail card spacing */
    .devops-detail-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .devops-detail-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* ===========================
   Tablet Specific Improvements
   =========================== */
@media (min-width: 768px) and (max-width: 991px) {
    /* Improve card layouts in tablet portrait */
    .devops-detail-card {
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
        text-align: left;
    }
    
    .devops-detail-icon {
        flex-shrink: 0;
    }
    
    /* Adjust service cards for better 2-column layout */
    .service-card {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .service-description {
        flex-grow: 1;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .navbar,
    .scroll-to-top,
    .scroll-indicator {
        display: none;
    }

    .hero-section {
        min-height: auto;
        page-break-after: always;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}