/* =========================================================
   SERVICE PAGE — ENTERPRISE-CLASS PROFESSIONAL DESIGN
   Scope: /services/*
   Typography: Poppins (headings) + Lato (body)
   Responsive: Mobile to 5K (320px - 5120px)

   DEPENDENCIES: Load these BEFORE this file:
   - ../core/variables.css (shared CSS properties)
   - ../core/typography.css (typography utilities)
   ========================================================= */

/* -----------------------------
   IMPORTS & TYPOGRAPHY
------------------------------ */
/* Note: Google Fonts loaded globally via common-scripts.php */

:root {
  /* ==========================================================================
     SERVICE PAGE COLORS - Page-specific, not in core
     ========================================================================== */
  --service-primary: #0b5ed7;
  --service-primary-dark: #084298;
  --service-text-dark: #1a1a1a;
  --service-text-medium: #444;
  --service-text-light: #666;
  --service-bg-light: #f7f9fc;
  --service-bg-white: #ffffff;
  --service-border: #e5e7eb;

  /* Use core shadows if available, fallback to service-specific */
  --service-shadow: var(--shadow-card, 0 4px 20px rgba(0, 0, 0, 0.08));
  --service-shadow-hover: var(--shadow-card-hover, 0 8px 30px rgba(0, 0, 0, 0.12));
  --service-transition: var(--transition-base, all 0.3s cubic-bezier(0.4, 0, 0.2, 1));

  /* Font stacks - use core if available */
  --font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ==========================================================================
     SERVICE HERO GRADIENTS - 6 variants for different services
     ========================================================================== */
  --hero-gradient-1: linear-gradient(135deg, rgba(11, 94, 215, 0.35) 0%, rgba(8, 66, 152, 0.55) 100%);
  --hero-gradient-2: linear-gradient(135deg, rgba(0, 139, 139, 0.35) 0%, rgba(0, 102, 128, 0.55) 100%);
  --hero-gradient-3: linear-gradient(135deg, rgba(71, 85, 105, 0.35) 0%, rgba(51, 65, 85, 0.55) 100%);
  --hero-gradient-4: linear-gradient(135deg, rgba(15, 76, 129, 0.35) 0%, rgba(0, 139, 139, 0.55) 100%);
  --hero-gradient-5: linear-gradient(135deg, rgba(153, 27, 27, 0.35) 0%, rgba(127, 29, 29, 0.55) 100%);
  --hero-gradient-6: linear-gradient(135deg, rgba(30, 64, 175, 0.35) 0%, rgba(29, 78, 216, 0.55) 100%);

  /* Darker gradient variants for CTA and Audience sections */
  --hero-gradient-dark-1: linear-gradient(135deg, rgb(8, 66, 152) 0%, rgb(5, 45, 105) 100%);
  --hero-gradient-dark-2: linear-gradient(135deg, rgb(0, 102, 128) 0%, rgb(0, 75, 95) 100%);
  --hero-gradient-dark-3: linear-gradient(135deg, rgb(51, 65, 85) 0%, rgb(30, 41, 59) 100%);
  --hero-gradient-dark-4: linear-gradient(135deg, rgb(15, 76, 129) 0%, rgb(0, 102, 128) 100%);
  --hero-gradient-dark-5: linear-gradient(135deg, rgb(127, 29, 29) 0%, rgb(95, 20, 20) 100%);
  --hero-gradient-dark-6: linear-gradient(135deg, rgb(29, 78, 216) 0%, rgb(20, 55, 150) 100%);
}

/* Note: Body typography is handled globally. overflow-x controlled by header.css */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--service-text-dark);
  margin-top: 0;
}

/* -----------------------------
   BREADCRUMB - Styles moved to core/breadcrumb.css
------------------------------ */

/* -----------------------------
   HERO SECTION - Using hero-centered.css
   Service-specific gradient overrides via data-service attribute
------------------------------ */

/* Default gradient for services */
.hero-centered {
  --hero-gradient: var(--hero-gradient-1);
}

/* Service-specific overlay colors based on image analysis */
.hero-centered[data-service="secure-product-development"] {
  --hero-gradient: var(--hero-gradient-1); /* Deep blue - matches security hologram */
}

.hero-centered[data-service="quality-testing-assurance"] {
  --hero-gradient: var(--hero-gradient-2); /* Teal - matches analytics dashboards */
}

.hero-centered[data-service="legacy-modernization"] {
  --hero-gradient: var(--hero-gradient-3); /* Slate gray - neutral for warm office tones */
}

.hero-centered[data-service="penetration-testing"] {
  --hero-gradient: var(--hero-gradient-4); /* Navy to cyan - matches night interface */
}

.hero-centered[data-service="threat-research-remediation"] {
  --hero-gradient: var(--hero-gradient-5); /* Crimson - matches threat/malware theme */
}

.hero-centered[data-service="compliance-data-governance"] {
  --hero-gradient: var(--hero-gradient-6); /* Professional blue - matches compliance icons */
}

/* -----------------------------
   CONTENT SECTIONS - 2 COLUMN ALTERNATING
------------------------------ */
.service-main {
  padding: var(--section-padding-y) var(--page-padding-x);
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.service-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 70px);
  align-items: center;
  margin-bottom: clamp(35px, 4vw, 50px);
  position: relative;
  padding: clamp(30px, 4vw, 45px) 0;
}

/* Alternating section backgrounds */
.service-section.section-bg-white {
  background: #ffffff;
}

.service-section.section-bg-light {
  background: #f5f7fa;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-left: 50vw;
  padding-right: 50vw;
}

/* Subtle separator for light sections */
.service-section.section-bg-light::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(203, 213, 225, 0.5) 20%, rgba(203, 213, 225, 0.5) 80%, transparent 100%);
}

/* Reverse layout for alternating sections */
.service-section.service-row-reverse {
  direction: rtl;
}

.service-section.service-row-reverse > * {
  direction: ltr;
}

/* Section Image */
.service-section-image {
  position: relative;
}

.service-section-image .image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--service-shadow);
  transition: var(--service-transition);
}

.service-section-image .image-wrapper:hover {
  box-shadow: var(--service-shadow-hover);
  transform: translateY(-4px);
}

.service-section-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.service-section-image .image-wrapper:hover img {
  transform: scale(1.05);
}

/* Section Content */
.service-section-content {
  padding: 20px;
}

.service-section-content h3 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: clamp(15px, 1.5vw, 30px);
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.service-section-content p {
  font-family: var(--font-body);
  font-size: clamp(16px, 1vw, 26px);
  font-weight: 400;
  line-height: 1.8;
  color: #4a4a4a;
  margin-bottom: 18px;
  text-align: justify;
  text-align-last: left;
}

/* Bullets */
.service-bullets {
  margin-top: 24px;
  padding-left: 0;
  list-style: none;
}

.service-bullets li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: clamp(16px, 1vw, 26px);
  font-weight: 400;
  line-height: 1.8;
  color: #4a4a4a;
  text-align: justify;
  text-align-last: left;
}

.service-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--service-primary), var(--service-primary-dark));
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(11, 94, 215, 0.3);
}

/* -----------------------------
   AUDIENCE SECTION
------------------------------ */
.service-audience {
  background: var(--service-bg-light);
  padding: clamp(60px, 10vw, 100px) 0;
  padding-bottom: clamp(50px, 8vw, 80px);
  margin-bottom: 0;
}

/* Audience section uses same dark gradient as CTA for visual merge */
.service-audience.hero1 { background: var(--hero-gradient-dark-1); }
.service-audience.hero2 { background: var(--hero-gradient-dark-2); }
.service-audience.hero3 { background: var(--hero-gradient-dark-3); }
.service-audience.hero4 { background: var(--hero-gradient-dark-4); }
.service-audience.hero5 { background: var(--hero-gradient-dark-5); }
.service-audience.hero6 { background: var(--hero-gradient-dark-6); }

.audience-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

.audience-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 36px);
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.audience-header p {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.4vw, 38px);
  font-weight: 600;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* Equal-height cards using flexbox (works with Bootstrap .col-md-6) */
.service-audience .row {
  display: flex;
  flex-wrap: wrap;
}

.audience-card-wrapper {
  display: flex; /* Stretch card to full column height */
  padding: 15px; /* Restore padding */
}

.audience-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: clamp(34px, 5vw, 48px);
  border-radius: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.audience-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.audience-card:hover::before {
  transform: scaleX(1);
}

.audience-card:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  transform: translateY(-8px);
}

/* Audience Header (Icon + Title side by side) */
.audience-card-header {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 24px);
  margin-bottom: 24px;
}

.audience-icon {
  width: clamp(70px, 10vw, 90px);
  height: clamp(70px, 10vw, 90px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audience-icon svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.audience-card:hover .audience-icon svg {
  transform: scale(1.1) rotate(5deg);
}

.audience-card h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 600;
  margin: 0;
  color: #ffffff;
  line-height: 1.3;
}

.audience-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  flex-grow: 1;
}

.audience-card li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: clamp(16px, 1vw, 26px);
  font-weight: 400;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  text-align: justify;
  text-align-last: left;
}

.audience-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 16px;
}

/* -----------------------------
   CTA SECTION
------------------------------ */
.service-cta {
  padding: clamp(50px, 8vw, 80px) 0;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--service-primary) 0%, var(--service-primary-dark) 100%);
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

/* CTA backgrounds use darker hero gradients */
.service-cta.hero1 { background: var(--hero-gradient-dark-1); }
.service-cta.hero2 { background: var(--hero-gradient-dark-2); }
.service-cta.hero3 { background: var(--hero-gradient-dark-3); }
.service-cta.hero4 { background: var(--hero-gradient-dark-4); }
.service-cta.hero5 { background: var(--hero-gradient-dark-5); }
.service-cta.hero6 { background: var(--hero-gradient-dark-6); }

.service-cta::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: cta-pulse 8s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate(10%, 10%) scale(1.1); opacity: 0.8; }
}

.cta-content {
  position: relative;
  z-index: 1;
}

.service-cta h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 32px;
  color: #ffffff;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: clamp(16px, 2vw, 20px) clamp(36px, 4.5vw, 52px);
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 600;
  color: var(--service-primary);
  background: #ffffff;
  border: none;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: var(--service-transition);
  cursor: pointer;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  color: var(--service-primary-dark);
}

.btn-cta .btn-arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.btn-cta:hover .btn-arrow {
  transform: translateX(5px);
}

/* -----------------------------
   RESPONSIVE BREAKPOINTS
------------------------------ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
  .service-section {
    gap: 40px;
    margin-bottom: 80px;
  }
  /* Hero scaling now handled by hero-centered.css */
}

/* Tablet Portrait & Mobile Landscape (max-width: 768px) */
@media (max-width: 768px) {
  .service-section {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
    padding: clamp(30px, 5vw, 40px) 0;
  }

  .service-section.service-row-reverse {
    direction: ltr;
  }

  .service-section-image {
    order: -1; /* Always show image first on mobile */
  }

  /* Mobile adjustments for alternating backgrounds */
  .service-section.section-bg-light {
    margin-left: -5vw;
    margin-right: -5vw;
    padding-left: 5vw;
    padding-right: 5vw;
  }
  /* Hero scaling now handled by hero-centered.css */

  .audience-card-wrapper {
    margin-bottom: 20px;
  }
}

/* Tablet and below - Hero centering now handled by hero-centered.css */

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  /* Breadcrumb styles moved to core/breadcrumb.css */

  .service-section {
    margin-bottom: 35px;
    padding: clamp(25px, 4vw, 35px) 0;
  }

  .service-section-content {
    padding: 0;
  }

  /* Main container padding handled by page-layout.css via CSS variables */

  .audience-header {
    margin-bottom: 35px;
  }

  .audience-card-header {
    gap: 14px;
  }

  .audience-icon {
    width: 70px;
    height: 70px;
  }

  .audience-card h3 {
    font-size: clamp(1.3rem, 5vw, 1.5rem);
  }

  .service-section-content h3 {
    font-size: clamp(18px, 4.5vw, 24px);
  }
}

/* Mobile Landscape - Breadcrumb styles moved to core/breadcrumb.css */

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
  /* Breadcrumb styles moved to core/breadcrumb.css */

  .service-section {
    margin-bottom: 30px;
    padding: clamp(20px, 4vw, 30px) 0;
  }

  .service-section-content {
    padding: 0;
  }

  .audience-header {
    margin-bottom: 30px;
  }

  .audience-card-header {
    gap: 12px;
  }

  .audience-icon {
    width: 60px;
    height: 60px;
  }

  .audience-card h3 {
    font-size: clamp(1.2rem, 5vw, 1.4rem);
  }
}

/* Large Screens (1920px - 2560px) */
@media (min-width: 1920px) {
  .service-main {
    max-width: 1600px;
  }
}

/* 2K/QHD Displays (2560px - 3839px) */
@media (min-width: 2560px) and (max-width: 3839px) {
  .service-main {
    max-width: 2000px;
  }

  /* Breadcrumb styles moved to core/breadcrumb.css */

  .service-cta h2 {
    font-size: 3.2rem;
  }

  /* CTA button 2K scaling - match Contact page */
  .btn-cta {
    font-size: clamp(17px, 1.15vw, 22px);
    padding: clamp(18px, 1.8vw, 26px) clamp(44px, 4vw, 62px);
  }
}

/* 4K Displays (3840px - 5119px) */
@media (min-width: 3840px) and (max-width: 5119px) {
  .service-main {
    max-width: 2400px;
  }

  /* Breadcrumb styles moved to core/breadcrumb.css */

  /* Content Sections - 4K scaling */
  .service-section-content h3 {
    font-size: clamp(28px, 2vw, 48px);
  }

  .service-section-content p {
    font-size: clamp(20px, 1vw, 32px);
  }

  .service-bullets li {
    font-size: clamp(20px, 1vw, 32px);
  }

  /* Audience Section - 4K scaling */
  .audience-header h2 {
    font-size: clamp(28px, 2vw, 48px);
  }

  .audience-header p {
    font-size: clamp(22px, 1.4vw, 44px);
  }

  .audience-card h3 {
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  }

  .audience-card li {
    font-size: clamp(20px, 1vw, 32px);
  }

  .service-cta h2 {
    font-size: clamp(44px, 2.8vw, 72px);
  }

  .btn-cta {
    font-size: clamp(19px, 1.1vw, 28px);
    padding: clamp(20px, 1.6vw, 32px) clamp(52px, 3.5vw, 72px);
    gap: 16px;
  }

  .btn-cta .btn-arrow {
    width: 28px;
    height: 28px;
  }
  /* Hero scaling now handled by hero-centered.css */
}

/* 5K+ Displays (5120px+) */
@media (min-width: 5120px) {
  .service-main {
    max-width: 3000px;
  }

  /* Breadcrumb styles moved to core/breadcrumb.css */

  /* Content Sections - 5K scaling */
  .service-section-content h3 {
    font-size: clamp(36px, 2vw, 64px);
  }

  .service-section-content p {
    font-size: clamp(24px, 1vw, 36px);
  }

  .service-bullets li {
    font-size: clamp(24px, 1vw, 36px);
  }

  /* Audience Section - 5K scaling */
  .audience-header h2 {
    font-size: clamp(36px, 2vw, 64px);
  }

  .audience-header p {
    font-size: clamp(28px, 1.4vw, 52px);
  }

  .audience-card h3 {
    font-size: clamp(1.8rem, 2.2vw, 2.6rem);
  }

  .audience-card li {
    font-size: clamp(24px, 1vw, 36px);
  }

  .service-cta h2 {
    font-size: clamp(52px, 2.8vw, 96px);
  }

  .btn-cta {
    font-size: clamp(22px, 1.1vw, 32px);
    padding: clamp(24px, 1.6vw, 40px) clamp(60px, 3.5vw, 88px);
    gap: 20px;
  }

  .btn-cta .btn-arrow {
    width: 36px;
    height: 36px;
  }
  /* Hero scaling now handled by hero-centered.css */
}

/* -----------------------------
   ACCESSIBILITY & PRINT
------------------------------ */

/* Focus States */
a:focus,
button:focus {
  outline: 2px solid var(--service-primary);
  outline-offset: 3px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Ken Burns disabled in hero-centered.css for reduced motion */
}

/* Print Styles */
@media print {
  /* Breadcrumb print styles moved to core/breadcrumb.css */
  .service-cta,
  .btn-cta {
    display: none;
  }

  .hero-centered {
    page-break-after: avoid;
  }

  .service-section {
    page-break-inside: avoid;
  }
}
