/* ==========================================================================
   DEPARTMENT PAGES — department.css
   ========================================================================== */

:root {
  --dept-accent: #3b82f6;
  --dept-accent-dark: #1d4ed8;
  --dept-bg: #f8f9fc;
  --dept-card-bg: #ffffff;
  --dept-text: #0f172a;
  --dept-muted: #64748b;
  --dept-border: #e2e8f0;
  --dept-radius: 16px;
  --dept-transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
  --dept-bg: #020617;
  --dept-card-bg: #0f172a;
  --dept-text: #f1f5f9;
  --dept-muted: #94a3b8;
  --dept-border: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   DEPARTMENT HERO
   ========================================================================== */
.department-main {
  min-height: 100vh;
}

.department-hero {
  padding: 80px 5% 60px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.dept-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dept-accent);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  margin-bottom: 1.2rem;
  padding: 6px 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 100px;
}

.department-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--dept-text);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.department-hero p {
  font-size: 1.05rem;
  color: var(--dept-muted);
  line-height: 1.75;
  max-width: 680px;
  margin: 0 auto;
}

/* ==========================================================================
   DEPARTMENT SWITCHER
   ========================================================================== */
.department-switcher {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 5% 56px;
  max-width: 900px;
  margin: 0 auto;
}

.department-switcher a {
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dept-muted);
  border: 1px solid var(--dept-border);
  transition: var(--dept-transition);
  font-family: 'DM Sans', sans-serif;
  background: var(--dept-card-bg);
}

.department-switcher a:hover {
  border-color: var(--dept-accent);
  color: var(--dept-accent);
}

.department-switcher a.active {
  background: var(--dept-accent-dark);
  border-color: var(--dept-accent-dark);
  color: #ffffff;
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.department-services {
  padding: 56px 5%;
  max-width: 1300px;
  margin: 0 auto;
}

.department-services h2,
.department-outcomes h2 {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dept-muted);
  margin-bottom: 36px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.marketing-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.department-card {
  background: var(--dept-card-bg);
  border: 1px solid var(--dept-border);
  border-radius: var(--dept-radius);
  padding: 32px;
  transition: var(--dept-transition);
  position: relative;
  overflow: hidden;
}

.department-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dept-accent-dark), var(--dept-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.department-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(29, 78, 216, 0.1);
}

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

.dept-number {
  display: inline-block;
  font-size: 0.65rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--dept-accent);
  margin-bottom: 14px;
  background: rgba(59, 130, 246, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
}

.department-card h3 {
  font-size: 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--dept-text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.department-card p {
  font-size: 0.875rem;
  color: var(--dept-muted);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   OUTCOMES SECTION
   ========================================================================== */
.department-outcomes {
  padding: 56px 5%;
  max-width: 1300px;
  margin: 0 auto;
  border-top: 1px solid var(--dept-border);
}

.outcome-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.outcome-item {
  padding: 22px 28px;
  background: var(--dept-card-bg);
  border: 1px solid var(--dept-border);
  border-left: 4px solid var(--dept-accent);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  color: var(--dept-text);
  line-height: 1.65;
  transition: var(--dept-transition);
}

.outcome-item:hover {
  border-left-color: var(--dept-accent-dark);
  box-shadow: 0 4px 16px rgba(29, 78, 216, 0.08);
  transform: translateX(4px);
}

/* ==========================================================================
   METHODOLOGY SECTION (Marketing)
   ========================================================================== */
.dept-methodology {
  padding: 80px 5%;
  background: var(--dept-bg);
  border-top: 1px solid var(--dept-border);
}

.dept-methodology-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.dept-methodology-header {
  max-width: 600px;
  margin-bottom: 56px;
}

.dept-methodology-header .dept-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dept-accent);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  display: block;
  margin-bottom: 14px;
}

.dept-methodology-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--dept-text);
  line-height: 1.15;
  margin-bottom: 14px;
}

.dept-methodology-header p {
  font-size: 1rem;
  color: var(--dept-muted);
  line-height: 1.7;
}

.dept-method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dept-method-step {
  background: var(--dept-card-bg);
  border: 1px solid var(--dept-border);
  border-radius: var(--dept-radius);
  padding: 36px;
  position: relative;
  transition: var(--dept-transition);
}

.dept-method-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(29, 78, 216, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.dept-step-num {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--dept-accent-dark), var(--dept-accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.2);
}

.dept-method-step h4 {
  font-size: 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  color: var(--dept-text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.dept-method-step p {
  font-size: 0.875rem;
  color: var(--dept-muted);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   PARTNERS CAROUSEL (Sales page)
   ========================================================================== */
.dept-partners {
  padding: 60px 0 40px;
  overflow: hidden;
  border-top: 1px solid var(--dept-border);
  background: var(--dept-bg);
}

.dept-partners-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dept-muted);
  text-align: center;
  margin-bottom: 28px;
  opacity: 0.7;
  font-family: 'DM Sans', sans-serif;
}

.dept-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.dept-carousel::before,
.dept-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.dept-carousel::before {
  left: 0;
  background: linear-gradient(90deg, var(--dept-bg), transparent);
}

.dept-carousel::after {
  right: 0;
  background: linear-gradient(-90deg, var(--dept-bg), transparent);
}

.dept-carousel-track {
  display: flex;
  width: calc(310px * 14);
  animation: dept-scroll 28s linear infinite;
}

.dept-carousel-track:hover {
  animation-play-state: paused;
}

@keyframes dept-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-310px * 7)); }
}

.dept-partner-item {
  width: 200px;
  margin: 0 30px;
  flex-shrink: 0;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dept-partner-item:hover {
  transform: scale(1.08);
}

.dept-partner-logo {
  height: 80px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.dept-partner-item:hover .dept-partner-logo {
  transform: scale(1.05);
}

.dept-partner-name {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dept-muted);
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.dept-partner-item:hover .dept-partner-name {
  opacity: 1;
  transform: translateY(0);
}

body.dark-mode .dept-partner-logo {
  filter: grayscale(0.3) brightness(1.2);
  opacity: 0.85;
}

body.dark-mode .dept-partner-item:hover .dept-partner-logo {
  filter: none;
  opacity: 1;
}

/* ==========================================================================
   MARKETING SIGNATURE
   ========================================================================== */
.marketing-signature {
  text-align: center;
  padding: 64px 5%;
  border-top: 1px solid var(--dept-border);
}

.marketing-signature h2 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--dept-text);
  opacity: 0.18;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   IT NOTE SECTION
   ========================================================================== */
.it-note {
  background: rgba(29, 78, 216, 0.03);
  border-top: 1px solid var(--dept-border);
}

body.dark-mode .it-note {
  background: rgba(59, 130, 246, 0.04);
}

/* ==========================================================================
   DARK MODE OVERRIDES
   ========================================================================== */
body.dark-mode .department-card {
  background: var(--dept-card-bg);
  border-color: var(--dept-border);
}

body.dark-mode .department-card:hover {
  background: #15243e;
  border-color: rgba(96, 165, 250, 0.3);
  box-shadow: 0 12px 32px rgba(96, 165, 250, 0.1);
}

body.dark-mode .outcome-item {
  background: var(--dept-card-bg);
  border-color: var(--dept-border);
  border-left-color: #60a5fa;
}

body.dark-mode .dept-method-step {
  background: var(--dept-card-bg);
  border-color: var(--dept-border);
}

body.dark-mode .dept-method-step:hover {
  background: #15243e;
  border-color: rgba(96, 165, 250, 0.3);
}

body.dark-mode .department-switcher a {
  background: var(--dept-card-bg);
  border-color: var(--dept-border);
  color: var(--dept-muted);
}

body.dark-mode .department-switcher a.active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

body.dark-mode .dept-partners {
  background: var(--dept-bg);
}

body.dark-mode .dept-methodology {
  background: var(--dept-bg);
}

/* ==========================================================================
   REVEAL ANIMATION
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE — 1100px
   ========================================================================== */
@media (max-width: 1100px) {
  .dept-method-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   RESPONSIVE — 768px
   ========================================================================== */
@media (max-width: 768px) {
  .department-hero {
    padding: 48px 5% 36px;
  }

  .department-hero h1 {
    font-size: 2rem;
  }

  .department-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .marketing-grid {
    grid-template-columns: 1fr;
  }

  .dept-method-steps {
    grid-template-columns: 1fr;
  }

  .department-card {
    padding: 24px;
  }

  .department-switcher {
    gap: 6px;
    padding-bottom: 40px;
  }

  .department-switcher a {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .dept-methodology {
    padding: 56px 5%;
  }

  .dept-method-step {
    padding: 26px;
  }

  .outcome-list {
    grid-template-columns: 1fr;
  }

  .dept-partner-logo {
    height: 60px;
  }

  .dept-partner-item {
    width: 150px;
    margin: 0 20px;
  }
}

/* ==========================================================================
   RESPONSIVE — 480px
   ========================================================================== */
@media (max-width: 480px) {
  .department-hero h1 {
    font-size: 1.7rem;
  }

  .department-card {
    padding: 20px;
  }

  .dept-method-step {
    padding: 22px;
  }

  .dept-step-num {
    width: 38px;
    height: 38px;
  }

  .marketing-signature h2 {
    font-size: 2rem;
  }
}
