/* ===== CUSTOM CSS FOR CALLIX LEADS ===== */

/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #ffffff;
    --black: #000000;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-hero: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    --transition: all 0.3s ease-in-out;
    --animation-duration: 0.6s;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--dark-color);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 700;
    line-height: 1.1;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
}

/* ===== UTILITY CLASSES ===== */
.min-vh-75 {
    min-height: 75vh;
}

.min-vh-100 {
    min-height: 100vh;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-hero {
    background: var(--gradient-hero);
}

/* ===== NAVIGATION ===== */
.navbar {
    padding-top: 0.5rem;   /* Bootstrap-like spacing */
    padding-bottom: 0.5rem;
    height: auto;          /* let height be natural */
}

/* Layout: brand left, menu right (Bootstrap default) */
.navbar .container, .navbar .container-fluid { justify-content: space-between; }

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #1955d6 !important; /* brand color */
    margin-right: 1rem; /* normal gap before menu */
}

/* Logo: fixed size, won't increase navbar height */
.navbar-logo {
    height: 48px;
    max-height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 575.98px) {
    .navbar-logo { height: 64px; max-height: 64px; }
}

/* Keep collapse content aligned right on desktop */
.navbar .navbar-collapse { margin-left: auto !important; width: auto !important; }

/* Show toggler only on mobile */
@media (max-width: 767.98px) {
    .navbar-toggler { display: block !important; }
}
@media (min-width: 768px) {
    .navbar-toggler { display: none !important; }
}

/* DIAGNOSTIC OVERRIDES (neutralized back to Bootstrap behavior) */
.navbar .navbar-collapse {
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
}

.navbar .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

.navbar .navbar-nav .nav-item { display: block !important; }

.navbar .navbar-nav .nav-link {
    display: inline-block !important;
    color: #212529 !important;
    transition: color 0.2s ease-in-out;
    text-decoration: none; /* reset */
    border-radius: 0.5rem; /* for background highlight */
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
    color: var(--primary-color) !important;
    background: rgba(13, 110, 253, 0.08); /* subtle primary tint */
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

.navbar .navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: var(--primary-color);
    font-weight: 600;
    border-radius: 0.5rem;
}

.navbar .navbar-nav .nav-link.active:hover,
.navbar .navbar-nav .nav-link.active:focus {
    color: #ffffff !important;
    background: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

/* Restore Bootstrap collapse behavior */
.navbar .collapse.navbar-collapse { display: none !important; }
.navbar .collapse.navbar-collapse.show { display: block !important; }

.navbar-nav {
    flex-direction: row !important;
    flex-wrap: wrap;
}

/* Ensure navbar menu is visible at md and up */
@media (min-width: 768px) {
    #navbarNav {
        display: flex !important;
    }
    .navbar-nav {
        margin-left: auto !important;
        flex-direction: row !important;
        align-items: center;
        gap: 0.25rem;
    }
}

/* Improve small-screen collapse spacing */
@media (max-width: 767.98px) {
    .navbar .navbar-nav {
         padding-top: 0.5rem;
         padding-bottom: 0.5rem;
         gap: 0.25rem;
         flex-direction: column !important; /* stack vertically */
         flex-wrap: nowrap !important;
         align-items: stretch !important;   /* full width items */
         margin-left: 0 !important;         /* reset auto alignment */
     }
     .navbar .navbar-collapse {
         width: 100% !important;
         margin-top: 0.25rem;
         background: #fff;
         border-top: 1px solid #e9ecef;
         border-bottom: 1px solid #e9ecef;
         border-radius: 0.25rem;
         box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.06);
         padding: 0.25rem 0.5rem;
     }
     .navbar .navbar-nav .nav-link {
         width: 100%;
         padding: 0.75rem 0.75rem;          /* larger tap targets */
     }
     .navbar-brand { margin-bottom: 0.25rem; }
     /* Use default Bootstrap collapse (dropdown-like panel) */
     .navbar .collapse.navbar-collapse { display: none !important; }
     .navbar .collapse.navbar-collapse.show { display: block !important; }
 }

/* ===== BUTTONS ===== */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::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: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: none;
    position: relative;
    overflow: hidden;
}

/* Remove previous grain overlay when using slider */
.hero-section::before { display: none; }

/* Background slider container */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: heroFade 18s infinite;
    transition: opacity 1s ease-in-out;
}

/* Replace URLs with your own images if desired */
.hero-bg .slide-1 { background-image: url(/assets/images/Logo/Main\ Images/Hero1.jpg); animation-delay: 0s; }
.hero-bg .slide-2 { background-image: url(/assets/images/Logo/Main\ Images/Hero2.jpg); animation-delay: 6s; }
.hero-bg .slide-3 { background-image: url(/assets/images/Logo/Main\ Images/Hero3.jpg); animation-delay: 12s; }

@keyframes heroFade {
  0%   { opacity: 0; }
  5%   { opacity: 1; }
  30%  { opacity: 1; }
  35%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Dark overlay to keep text legible */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2; /* above overlay and slides */
}

/* Gentle floating animation for hero image */
@keyframes floatY {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.hero-float {
    animation: floatY 6s ease-in-out infinite;
    will-change: transform;
}

/* ===== ABOUT PAGE HERO ===== */
.about-hero-section {
  position: relative;
  background-image: url('/assets/images/Logo/Aboutus.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.about-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
}

.about-hero-section > .container { position: relative; z-index: 1; }

/* ===== ABOUT PAGE CTA ===== */
.about-cta-section {
  position: relative;
  background-image: url('/assets/images/Logo/AboutCTA.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.about-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
}

.about-cta-section > .container { position: relative; z-index: 1; }

/* ===== CONTACT PAGE HERO ===== */
.contact-hero-section {
  position: relative;
  background-image: url('/assets/images/Logo/ContactUs.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.contact-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
}

.contact-hero-section > .container { position: relative; z-index: 1; }

/* ===== CONTACT PAGE CTA ===== */
.contact-cta-section {
  position: relative;
  background-image: url('/assets/images/Logo/ContactUsCTA.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.contact-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
}

.contact-cta-section > .container { position: relative; z-index: 1; }

/* ===== SERVICES PAGE HERO ===== */
.services-hero-section {
  position: relative;
  background-image: url('/assets/images/Logo/services.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.services-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.35));
}

.services-hero-section > .container { position: relative; z-index: 1; }

/* ===== SERVICES PAGE CTA ===== */
.services-cta-section {
  position: relative;
  background-image: url('/assets/images/Logo/servicesCTA.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.services-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
}

.services-cta-section > .container { position: relative; z-index: 1; }

/* ===== CTA SECTION (Ready to Scale) ===== */
.cta-section {
  position: relative;
  background-image: url('/assets/images/Logo/Main Images/Hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  isolation: isolate; /* ensure overlay stacking */
}

/* dark overlay for readability */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
  z-index: -1;
}

/* place content above overlay */
.cta-section > .container { position: relative; z-index: 1; }

/* ===== CARDS ===== */
.service-card,
.testimonial-card,
.team-card,
.contact-info-card,
.service-detail-card {
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before,
.testimonial-card::before,
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.hover-lift:hover::before {
    opacity: 1;
}

.service-icon,
.value-icon {
    transition: var(--transition);
}

.service-card:hover .service-icon,
.value-card:hover .value-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ===== SERVICES: ENTRY FLIP ANIMATION ===== */
@keyframes flipZoomIn {
  0% { transform: perspective(1000px) translateY(20px) rotateY(75deg) scale(0.92); opacity: 0; filter: blur(2px); }
  55% { transform: perspective(1000px) translateY(-3px) rotateY(-8deg) scale(1.03); opacity: 1; filter: blur(0); }
  75% { transform: perspective(1000px) translateY(0) rotateY(3deg) scale(0.995); }
  100% { transform: perspective(1000px) translateY(0) rotateY(0) scale(1); }
}

/* Base 3D settings to prevent flicker during flip */
.service-card { backface-visibility: hidden; transform-style: preserve-3d; will-change: transform, opacity; }

/* Trigger class applied by JS on first page load */
.service-card.flip-animate {
  animation: flipZoomIn 13000ms cubic-bezier(.22,1.28,.22,1) both;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .service-card.flip-animate { animation: none; }
}

/* ===== SERVICES DETAIL CARDS: ENTRANCE + IDLE ANIMATIONS ===== */
@keyframes serviceCardIn {
  0%   { transform: perspective(1000px) translateY(40px) rotateX(8deg) scale(0.96); opacity: 0; filter: blur(2px); }
  55%  { transform: perspective(1000px) translateY(-6px) rotateX(-3deg) scale(1.02); opacity: 1; filter: blur(0); }
  75%  { transform: perspective(1000px) translateY(0) rotateX(1.5deg) scale(0.998); }
  100% { transform: perspective(1000px) translateY(0) rotateX(0) scale(1); }
}

@keyframes serviceCardIdle {
  0%   { transform: translateY(0) scale(1); box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.06); }
  50%  { transform: translateY(-2px) scale(1.005); box-shadow: 0 0.4rem 1rem rgba(0,0,0,0.08); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.06); }
}

.service-detail-card { backface-visibility: hidden; transform-style: preserve-3d; will-change: transform, opacity; }
.service-detail-card.enter-animate { animation: serviceCardIn 3000ms cubic-bezier(.22,1,.36,1) both; }
.service-detail-card.idle-animate { animation: serviceCardIdle 6000ms ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .service-detail-card.enter-animate, .service-detail-card.idle-animate { animation: none; }
}

/* ===== KPI COUNTERS ===== */
.kpi-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;                 /* center content */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 140px;             /* equal height baseline */
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.kpi-card:hover::before {
    opacity: 0.05;
}

.counter {
    font-family: 'Inter', monospace;
    font-weight: 800;
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.1;
    font-family: serif;
}

/* Testimonials carousel controls (blue buttons with glow) */
#testimonialsCarousel .carousel-control-prev,
#testimonialsCarousel .carousel-control-next {
    width: auto;                 /* keep controls tight to icon */
    padding: 0.5rem;             /* larger tap target */
}

#testimonialsCarousel .carousel-control-prev-icon,
#testimonialsCarousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--primary-color);   /* blue button */
    background-size: 1rem 1rem;               /* arrow size */
    background-position: center;              /* center arrow */
    box-shadow: 0 0 0 rgba(13,110,253,0);     /* no glow by default */
    transition: var(--transition);
}

#testimonialsCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#testimonialsCarousel .carousel-control-next:hover .carousel-control-next-icon,
#testimonialsCarousel .carousel-control-prev:focus .carousel-control-prev-icon,
#testimonialsCarousel .carousel-control-next:focus .carousel-control-next-icon {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.75rem rgba(13,110,253,0.7), 0 0 0 4px rgba(13,110,253,0.25) inset; /* glow */
}

/* ===== TEAM SECTION ===== */
.team-avatar {
    transition: var(--transition);
    border: 4px solid var(--white);
    box-shadow: var(--box-shadow);
}

.team-card:hover .team-avatar {
    transform: scale(1.1);
    box-shadow: var(--box-shadow-lg);
}

.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
}

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-year {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    box-shadow: var(--box-shadow);
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    width: 45%;
    transition: var(--transition);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 55%;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.125rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.invalid-feedback {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--animation-duration) ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* ===== HOVER EFFECTS ===== */
.hover-text-primary:hover {
    color: var(--primary-color) !important;
    transition: var(--transition);
}

.hover-opacity-100:hover {
    opacity: 1 !important;
    transition: var(--transition);
}

.grayscale {
    filter: grayscale(100%);
    transition: var(--transition);
}

.grayscale:hover {
    filter: grayscale(0%);
}

/* ===== PROCESS STEPS ===== */
.process-step {
    position: relative;
}

.step-number .badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.newsletter-form .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1199.98px) {
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-marker {
        left: 2rem;
    }
    
    .timeline-content {
        width: calc(100% - 4rem);
        margin-left: 4rem !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
    }
    
    .timeline-content {
        width: calc(100% - 3rem);
        margin-left: 3rem !important;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-marker {
        left: 1rem;
    }
    
    .timeline-content {
        width: calc(100% - 2rem);
        margin-left: 2rem !important;
        padding: 1.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1.125rem;
    }
    
    .kpi-card {
        margin-bottom: 1rem;
        min-height: 150px;             /* equal height baseline */
    }
    
    .kpi-card .display-5 { margin-bottom: 0.25rem; }
    .kpi-card p { margin-bottom: 0; }
    
    .service-card,
    .testimonial-card,
    .team-card {
        margin-bottom: 1.5rem;
    }
}

/* ===== 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;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --secondary-color: #000000;
        --success-color: #008000;
        --danger-color: #ff0000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .btn,
    footer,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ===== FIX: Tailwind vs Bootstrap collapse conflict ===== */
/* Tailwind defines `.collapse { visibility: collapse; }`, which hides Bootstrap's accordion content. */
.collapse,
.collapsing,
.accordion-collapse {
    visibility: visible !important;
}

/* ===== ABOUT PAGE CARDS: ENHANCED ANIMATIONS ===== */
.hover-lift-lg {
  position: relative;
  transition: transform 450ms ease, box-shadow 450ms ease;
}
.hover-lift-lg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 50% 20%, rgba(0,0,0,0.08), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity 450ms ease;
  pointer-events: none;
  border-radius: inherit;
}
.hover-lift-lg:hover {
  transform: translateY(-16px) scale(1.02);
  box-shadow: var(--box-shadow-xl, 0 1.25rem 2rem rgba(0,0,0,0.12));
}
.hover-lift-lg:hover::before { opacity: 1; }

@keyframes aboutCardIn {
  0%   { transform: translateY(40px) scale(0.96); opacity: 0; filter: blur(2px); }
  55%  { transform: translateY(-6px) scale(1.02); opacity: 1; filter: blur(0); }
  75%  { transform: translateY(0) scale(0.998); }
  100% { transform: translateY(0) scale(1); }
}

/* Trigger larger entrance only on About page cards when their row fades in */
.about-page .fade-in-up.animate .about-card {
  animation: aboutCardIn 1600ms cubic-bezier(.2,.8,.2,1) both;
}

/* Optional stagger using nth-child within the row */
.about-page .row.g-4 > [class*='col-'].fade-in-up.animate .about-card { animation-delay: calc(var(--stagger, 0s)); }
.about-page .row.g-4 > [class*='col-']:nth-child(1) .about-card { --stagger: 40ms; }
.about-page .row.g-4 > [class*='col-']:nth-child(2) .about-card { --stagger: 100ms; }
.about-page .row.g-4 > [class*='col-']:nth-child(3) .about-card { --stagger: 160ms; }
.about-page .row.g-4 > [class*='col-']:nth-child(4) .about-card { --stagger: 220ms; }
.about-page .row.g-4 > [class*='col-']:nth-child(5) .about-card { --stagger: 280ms; }
.about-page .row.g-4 > [class*='col-']:nth-child(6) .about-card { --stagger: 340ms; }
