:root {
  --primary: #E03322;
  --hover: #ED930B;
  --accent: #86B823;
  --cta: #15803D;
  --cta-hover: #1A9C4D;
  --dark: #2E2E2E;
  --light: #FFF7EE;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--dark);
  background: #fff;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Professional Text Alignment */
.professional-text {
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.75;
  hyphens: auto;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.client-description {
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.25rem;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 32px;
  align-items: center;
  background: var(--light);
  padding: 48px;
  border-radius: 12px;
}

.hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
}

.hero h1 {
  font-size: 2.2rem;
  margin: 0 0 12px;
}

/* Buttons */
.btn-primary {
  background: var(--cta);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
  border: none;
  font-weight: 700;
  transition: background .2s ease;
}

.btn-primary:hover {
  background: var(--cta-hover);
}

.btn {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-block;
}

/* Service Cards */
.service-card-portrait {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  text-align: center;
  transition: all .3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.service-card-portrait:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0,0,0,.15);
}

.service-card-portrait img {
  width: 100%;
  height: 256px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.service-card-portrait:hover img {
  transform: scale(1.04);
}

.service-card-portrait:hover {
  transform: translateY(-4px);
}

/* Portfolio Items */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  transition: all .3s ease;
  will-change: transform;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  will-change: transform;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

/* Client Logos */
.client-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%) opacity(.7);
  transition: all .3s ease;
}

.client-logo:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

/* Trust Badge Animations */
.trust-badge {
  animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Image Loading Optimization */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* KBC Specific Styles */
.kbc-ghost {
  background: #fff;
  border: 1px solid #e6e6e6;
  padding: 6px 10px;
  border-radius: 999px;
  color: #15803D;
  text-decoration: none;
  font-weight: 600;
  transition: all .2s ease;
}

.kbc-ghost:hover {
  background: #f7f7f7;
  color: #1A9C4D;
}

.text-kbc-green {
  color: #15803D;
}

.text-kbc-green:hover {
  color: #1A9C4D;
}

/* Service and Portfolio Grids */
.service-card img,
.portfolio img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: contain;
  background: var(--light);
  border-radius: 8px;
}

.client-strip {
  overflow: hidden;
}

.client-strip img {
  width: 100%;
  height: auto;
  display: block;
}

/* FAQ Section Styles */
details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  margin-bottom: 2rem;
}

.rotate-180 {
  transform: rotate(180deg);
}

/* Responsive Grids */
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1023px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Optimizations */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px;
  }
  
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .service-card-portrait {
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .service-card-portrait {
    margin-bottom: 1.5rem;
  }
  
  .professional-text {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Print Styles */
@media print {
  .trust-badge,
  .mobile-floating-bar {
    display: none !important;
  }
}