:root {
    --primary-color: #3ab54a;      /* Green - rgba(58, 181, 74) */
    --secondary-color: #1c74bc;    /* Blue - rgba(28, 116, 188) */
    --accent-color: #fdcd03;       /* Yellow - rgba(253, 205, 3) */
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
}

/* Critical Above-the-Fold Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 80px;
    line-height: 1.6;
    overflow-x: hidden;
    /* Ensure content is visible even during loading */
    opacity: 1 !important;
}

/* SEO: Ensure content is immediately visible to bots and crawlers */
.bot-visited [class*="animate-"],
.no-js [class*="animate-"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

/* SEO: Critical content visibility */
.hero-slide {
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Navigation Styles */
.navbar {
    background-color: rgba(44, 62, 80, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 15px 0;
}

.navbar.scrolled {
    background-color: rgba(44, 62, 80, 0.98) !important;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.navbar.scrolled .navbar-brand img {
    height: 40px;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 8px;
    padding: 8px 16px !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Hero Section with Sliding Images - SEO Optimized */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* SEO: Ensure images are accessible */
    background-color: var(--dark-color); /* Fallback color */
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-badge {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* SEO: Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.preloader-spinner .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Cards and Hover Effects */
.card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.team-card {
    text-align: center;
    transition: all 0.4s ease;
}

.team-card img {
    height: 280px;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: grayscale(0.3);
}

.team-card:hover img {
    transform: scale(1.1);
    filter: grayscale(0);
}

.team-card .card-body {
    position: relative;
    overflow: hidden;
}

.team-card:hover .card-body {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.team-card:hover .card-title,
.team-card:hover .card-text {
    color: white;
}

/* Buttons with Advanced Effects */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border: none;
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(28, 116, 188, 0.4);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s ease;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.2);
}

/* Feature Icons with Animation */
.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
    transition: all 0.4s ease;
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    z-index: -1;
    opacity: 0;
    transition: all 0.4s ease;
}

.feature-box:hover .feature-icon {
    transform: rotateY(180deg) scale(1.1);
}

.feature-box:hover .feature-icon::after {
    opacity: 0.3;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
}

/* Text Gradients */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern.png');
    opacity: 0.1;
}

.stat-item {
    text-align: center;
    padding: 30px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 2.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}

/* Approach Items */
.approach-item {
    padding: 40px 30px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.approach-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(28, 116, 188, 0.1), transparent);
    transition: left 0.6s ease;
}

.approach-item:hover::before {
    left: 100%;
}

.approach-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.approach-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.approach-item:hover .approach-icon {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-color);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contact-form:hover {
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.3rem rgba(28, 116, 188, 0.1);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--dark-color) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

/* Animations - SEO: Reduced motion support */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out;
}

.animate-delay-1 { animation-delay: 0.2s; }
.animate-delay-2 { animation-delay: 0.4s; }
.animate-delay-3 { animation-delay: 0.6s; }

/* SEO: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in-up,
    .animate-fade-in-left,
    .animate-fade-in-right {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .card:hover,
    .team-card:hover,
    .approach-item:hover,
    .service-item:hover {
        transform: none !important;
    }
    
    .hero-badge {
        animation: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .btn-primary, .btn-outline-light {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fixed Hero Section Styles */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Dark overlay for better text readability */
.hero-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Hero badge positioning for mobile */
.hero-badge {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
    position: relative;
    z-index: 4;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .hero-content {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 8px 16px;
        margin-bottom: 15px;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-section h2 {
        font-size: 1.3rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Ensure text is always visible */
    .hero-content > .container > .row {
        min-height: calc(100vh - 140px);
        align-items: center;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .hero-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-section h2 {
        font-size: 1.1rem !important;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Team Section Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

.team-member {
    text-align: center;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover img {
    transform: scale(1.05);
}

.team-member h4 {
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Smooth transitions for hero slides */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-slide.active {
    animation: slideIn 1.5s ease-in-out;
}

/* Professional Services Section with Background Images */
.services-hero-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.services-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.services-hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(28, 116, 188, 0.85) 0%, 
        rgba(58, 181, 74, 0.85) 100%);
    z-index: 2;
}

.services-hero-content {
    position: relative;
    z-index: 3;
    color: white;
}

/* Service Categories with Background Images */
.service-category {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.service-category-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.service-category-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(28, 116, 188, 0.85) 0%, 
        rgba(58, 181, 74, 0.85) 100%);
    z-index: 2;
}

.service-category-content {
    position: relative;
    z-index: 3;
    color: white;
}

/* Ensure background images are visible */
.service-category .service-category-bg {
    background-attachment: scroll;
}

/* Call to Action Section */
.cta-section {
    position: relative;
    padding: 100px 0;
    color: white;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.cta-content {
    position: relative;
    z-index: 3;
}

/* Individual Service Items */
.service-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    position: relative;
    z-index: 4;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.8rem;
}

/* Service Features Grid */
.service-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-feature {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.service-feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

/* Process Numbers */
.process-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Badge Styles */
.cta-badge {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 20px;
}

/* Responsive Design for Services */
@media (max-width: 768px) {
    .services-hero-section {
        padding: 80px 0;
        text-align: center;
        min-height: 50vh;
    }
    
    .service-category {
        padding: 60px 0;
        min-height: 40vh;
    }
    
    .service-item {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .service-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-section {
        padding: 80px 0;
    }
}

/* Animation for service items */
@keyframes fadeInUpService {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-item {
    animation: fadeInUpService 0.6s ease-out;
}

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
.service-item:nth-child(4) { animation-delay: 0.4s; }
.service-item:nth-child(5) { animation-delay: 0.5s; }

/* SEO: Print Styles */
@media print {
    .navbar,
    .preloader,
    .btn-scroll-top {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .hero-section {
        min-height: auto;
        page-break-after: avoid;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .text-gradient {
        background: none;
        -webkit-text-fill-color: initial;
        color: var(--secondary-color);
    }
}

/* SEO: Focus styles for accessibility */
a:focus,
button:focus,
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* SEO: High contrast support */
@media (prefers-contrast: high) {
    .hero-slide::after {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn-primary {
        border: 2px solid var(--dark-color);
    }
}

/* SEO: Performance optimizations */
.hero-slide {
    will-change: opacity;
}

.card {
    will-change: transform;
}

/* Ensure content is visible even if JS fails */
.no-js .preloader {
    display: none !important;
}

.no-js .hero-slide {
    opacity: 1 !important;
    position: relative !important;
}

/* Loading states for better UX */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
}
