:root {
    --primary-color: #0066ff; /* Modern tech blue */
    --secondary-color: #00d4ff; /* Accent cyan */
    --light-gray: #f8f9fa;
    --dark-gray: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-headings: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    /* Dark mode colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #2a2a2a;
    --shadow-sm-dark: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md-dark: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg-dark: 0 8px 24px rgba(0,0,0,0.5);
}

body {
    font-family: var(--font-family-sans-serif);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: 70px;
    margin: 0;
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.navbar {
    box-shadow: var(--shadow-sm);
    background: rgba(10, 10, 10, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar:hover {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand {
    font-family: var(--font-family-headings);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.navbar .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-item.active .nav-link {
    color: var(--secondary-color) !important;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.hero-banner {
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: -70px; /* Pull carousel up under navbar */
}

#heroCarousel {
    position: relative;
}

#heroCarousel .carousel-inner {
    padding-top: 70px; /* Add padding to compensate for navbar */
}

#heroCarousel .carousel-item {
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#heroCarousel .carousel-item img {
    height: 100vh;
    max-height: 900px;
    min-height: 600px;
    object-fit: cover;
    filter: brightness(0.4);
}

#heroCarousel .carousel-caption {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.85), rgba(0, 102, 255, 0.2));
    padding: 50px;
    border-radius: 20px;
    bottom: 20%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg-dark);
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

#heroCarousel .carousel-caption h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.03em;
}

#heroCarousel .carousel-caption p {
    font-size: 1.3rem;
    color: #f0f0f0; /* Slightly off-white for softer look */
    margin-bottom: 20px;
}

#heroCarousel .btn-primary,
.hero-cta-btn {
    font-size: 1rem;
    padding: 14px 35px;
    background: var(--gradient-primary);
    border: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

#heroCarousel .btn-primary:hover,
.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

/* === Services Section === */
#services {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
}

#services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

#services .text-center { /* Targeting the h2 container */
    margin-bottom: 40px !important; /* Bootstrap's mb-4 might be overridden, ensure enough space */
}

#services h2 {
    color: var(--text-primary);
    font-weight: 700;
}

.service-card {
    margin-bottom: 30px; /* Spacing between cards on smaller screens */
}

.service-card .card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm-dark);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.service-card .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 102, 255, 0.2);
    border-color: var(--primary-color);
}

.service-card .card-img-top {
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Ensure image covers the area, might crop */
}

.service-card .card-body {
    padding: 25px;
    text-align: center; /* Center align card content */
}

.service-card .card-title {
    font-size: 1.4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card .card-text {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* === Contact Form Section === */
#contact {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
}

#contact .text-center { /* Targeting the h2 container */
    margin-bottom: 40px !important;
}

#contact h2 {
    color: var(--text-primary);
    font-weight: 700;
}

#contact .form-control {
    border-radius: 8px;
    padding: 14px;
    font-size: 1rem;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#contact .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
    background-color: var(--bg-secondary);
}

#contact .form-control:invalid {
    border-color: #ff6b6b;
}

#contact .form-control:valid {
    border-color: #51cf66;
}

#contact .form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#contact label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

#contact button[type="submit"] {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    margin-top: 20px;
}

#contact button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

/* === Footer === */
footer.bg-dark {
    background: var(--gradient-dark) !important;
    color: #ccc;
    padding: 50px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    margin-bottom: 0; /* Remove default paragraph margin */
    font-size: 0.95rem;
}

footer a {
    color: #fff; /* White links in footer */
    text-decoration: underline;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* === Our Work Gallery Section === */
#our-work {
    background-color: var(--bg-secondary);
}

#our-work h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 40px !important;
}

#our-work .card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm-dark);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

#our-work .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 102, 255, 0.2);
    border-color: var(--primary-color);
}

#our-work .card-img-top {
    height: 250px; /* Adjust as needed for gallery images */
    object-fit: cover;
}

#our-work .card-body {
    padding: 20px;
    text-align: left; /* Or center if preferred */
}

#our-work .card-title {
    font-size: 1.3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 10px;
    font-weight: 600;
}

#our-work .card-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* === Navigation Bar CTA === */
.nav-cta-btn {
    padding: 10px 25px !important;
    font-size: 0.9rem !important;
    background: var(--gradient-primary) !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    transition: all 0.3s ease !important;
}

.nav-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

/* No specific hover for .nav-cta-btn needed if it uses .btn-primary styles,
   which already has a hover state. If a different color was used for .nav-cta-btn,
   a specific hover would be added here. */

/* === General Button Enhancements === */
/* .btn { */ /* General styling for all buttons if needed */
    /* min-width: 150px; */ /* Example: ensure buttons have a minimum width */
    /* text-align: center; */
/* } */

/* .btn-primary { */
    /* Ensure high contrast against typical backgrounds */
    /* Standard Bootstrap primary is usually fine, but double check if background changes */
/* } */

/* === About Us / Trust Signals Section === */
#about-us {
    background-color: var(--bg-primary) !important;
}

#about-us p {
    color: var(--text-secondary);
}
#about-us h4 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    margin-bottom: 15px;
    font-weight: 700;
}

/* === Testimonials Section === */
#testimonials {
    background-color: var(--bg-secondary);
}

#testimonials h2 {
    color: var(--text-primary);
}

#testimonials .card {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm-dark);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

#testimonials .card:hover {
    box-shadow: 0 8px 20px rgba(0, 102, 255, 0.1);
    transform: translateY(-5px);
}
#testimonials .blockquote {
    font-size: 1.05rem;
    line-height: 1.6;
}

#testimonials .blockquote p {
    color: var(--text-secondary);
}

#testimonials .blockquote-footer {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* === Additional Modern Tech Styling === */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll offset for fixed navbar */
section[id]:before,
div[id]:before {
    content: "";
    display: block;
    height: 90px; /* Height of navbar + extra space */
    margin-top: -90px;
    visibility: hidden;
}

/* Loading animation for buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

.btn-primary:active {
    animation: pulse 0.5s;
}

/* Gradient text animation for headings */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.navbar-brand:hover,
.service-card .card-title:hover,
#our-work .card-title:hover,
#about-us h4:hover {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Form select styling */
#contact select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230066ff' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Service Selection Styling */
.service-selection-group {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.service-group-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: block;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.service-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-count {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.selection-controls {
    display: flex;
    gap: 10px;
}

.selection-controls .btn {
    padding: 6px 16px;
    font-size: 0.875rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.service-checkbox-item {
    position: relative;
}

.service-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.service-label {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 60px;
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.service-label:hover {
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}

.service-icon {
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.service-name {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.service-check {
    position: absolute;
    right: 20px;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

/* Checked state */
.service-checkbox:checked + .service-label {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.service-checkbox:checked + .service-label .service-check {
    opacity: 1;
    transform: scale(1);
}

.service-checkbox:checked + .service-label .service-name {
    color: var(--primary-color);
    font-weight: 600;
}

/* Focus state for accessibility */
.service-checkbox:focus + .service-label {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Keyboard navigation indicator */
.service-checkbox:focus-visible + .service-label {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.5);
}

/* Mobile responsiveness for service selection */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .service-selection-group {
        padding: 20px 15px;
    }
    
    .service-label {
        padding: 14px 16px;
        min-height: 56px; /* Ensure 44px+ touch target with padding */
    }
    
    .service-icon {
        font-size: 1.3rem;
        margin-right: 10px;
    }
    
    .service-name {
        font-size: 0.95rem;
    }
    
    .service-selection-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .selection-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-label {
        border-width: 3px;
    }
    
    .service-checkbox:checked + .service-label {
        background: var(--primary-color);
        color: white;
    }
    
    .service-checkbox:checked + .service-label .service-name {
        color: white;
    }
    
    .service-checkbox:checked + .service-label .service-check {
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .service-label,
    .service-check,
    .selection-controls .btn {
        transition: none;
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    #heroCarousel .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    #heroCarousel .carousel-caption {
        padding: 20px;
        bottom: 5%;
    }
    
    .service-card {
        margin-bottom: 20px;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* Accessibility improvements */
.btn:focus,
.form-control:focus,
a:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Loading state for form submission */
#contact button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Fade-in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
#our-work .card,
#testimonials .card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger the animations */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Tech-style section dividers */
section::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.3), transparent);
    margin: 40px auto;
    max-width: 200px;
}

/* Remove divider from last section */
#contact::after {
    display: none;
}
