:root {
    --primary-blue: #2E5C99;
    --secondary-blue: #1E4070;
    --accent-green: #6FB951;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #333333;
    --text-gray: #666666;
}

/* Critical Layout Reset */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Sticky Footer Layout - Critical */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Force correct order */
body > header {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
}

body > main {
    order: 2;
    flex: 1 0 auto;
    width: 100%;
}

body > footer,
body > .footer {
    order: 3;
    flex: 0 0 auto;
    width: 100%;
    margin-top: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

.code-font {
    font-family: 'Source Code Pro', monospace;
}

/* --- Glassmorphism Sticky Navbar --- */
.navbar {
    background: rgba(30, 64, 112, 0.75) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar.scrolled {
    background: rgba(30, 64, 112, 0.97) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.navbar-dark {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.brand-text {
    color: white;
    letter-spacing: 2px;
}

.tech-text {
    color: var(--accent-green);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-green) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: var(--accent-green) !important;
    border-bottom: 2px solid var(--accent-green);
}

.navbar-nav .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem !important;
}

/* --- Animated Hero --- */
.hero-section {
    background: linear-gradient(-45deg, #1E4070, #2E5C99, #1a5c3a, #2E5C99);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    color: white;
    padding: 130px 0 100px;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-section .d-flex {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.8s;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; }
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-green);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-title {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-description {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Content Sections */
.content-section {
    background: white;
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background: var(--light-gray);
}

.content-section:last-of-type {
    padding-bottom: 4rem;
    margin-bottom: 3rem;
}

.section-title {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--accent-green);
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Info Boxes */
.info-box {
    background: white;
    border-left: 4px solid var(--accent-green);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-box h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.info-box p {
    color: var(--text-gray);
    margin-bottom: 0;
}

.info-box ul {
    color: var(--text-gray);
    margin-bottom: 0;
}

/* Process Steps */
.process-step {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    padding-left: 5rem;
}

.step-number {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-green), #5ca840);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.process-step h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.process-step p {
    color: var(--text-gray);
    margin-bottom: 0;
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.contact-form h3 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.form-control {
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 0.2rem rgba(111, 185, 81, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(46, 92, 153, 0.4);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green), #5ca840);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(111, 185, 81, 0.4);
    background: linear-gradient(135deg, #5ca840, var(--accent-green));
}

.btn-outline-light:hover {
    transform: translateY(-3px);
}

/* Footer Styles - Force bottom position */
footer.footer,
.footer {
    background: #1a1a1a !important;
    color: #b8b8b8 !important;
    position: relative;
    z-index: 1;
}

.footer h5 {
    color: var(--accent-green) !important;
}

.footer .text-muted {
    color: #b8b8b8 !important;
}

.footer a {
    transition: color 0.3s ease;
    color: #b8b8b8 !important;
    text-decoration: none;
}

.footer a:hover {
    color: var(--accent-green) !important;
}

.footer .contact-info p {
    color: #b8b8b8 !important;
}

.footer .contact-info i {
    color: var(--accent-green) !important;
}

/* Badges and Labels */
.badge-custom {
    background: var(--accent-green);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

/* Accordion Styles */
.accordion-button {
    background-color: white;
    color: var(--primary-blue);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--light-gray);
    color: var(--accent-green);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(111, 185, 81, 0.25);
}

/* Alert Styles */
.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .content-section:last-of-type {
        padding-bottom: 3rem;
        margin-bottom: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .process-step {
        padding-left: 1.5rem;
        padding-top: 4rem;
    }
    
    .step-number {
        left: 50%;
        top: 1.5rem;
        transform: translateX(-50%);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* --- Scroll Reveal --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-blue) !important;
}

.text-accent {
    color: var(--accent-green) !important;
}

.bg-light-custom {
    background-color: var(--light-gray) !important;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(46, 92, 153, 0.05), rgba(111, 185, 81, 0.05));
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

/* Logo Styles */
.navbar-brand img {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

/* Gap utility for older browsers */
.gap-3 {
    gap: 1rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .contact-form {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 1rem 0 !important;
    }
    
    .service-card {
        box-shadow: none !important;
        border: 1px solid var(--medium-gray) !important;
    }
}

/* Navbar logo - no text, just the mark */
.navbar-logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 4px 12px rgba(111, 185, 81, 0.5));
}

/* Hero logo - large, animated */
.hero-logo {
    width: 260px;
    height: 260px;
    filter: drop-shadow(0 8px 32px rgba(111, 185, 81, 0.35));
    opacity: 0;
    transform: scale(0.85) rotate(-8deg);
    animation: heroLogoIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.4s;
}

@keyframes heroLogoIn {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@media (max-width: 992px) {
    .hero-logo {
        width: 160px;
        height: 160px;
    }
}