/* ===== Services Hub & Packages Styles ===== */

@keyframes hub-hero-media-in {
  from {
    opacity: 0;
    transform: scale(1.055);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes hub-hero-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes hub-hero-copy-in {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  60% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hub Hero --- */
.hub-hero {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 58%, #93c5fd 100%);
  position: relative;
  overflow: hidden;
  /* Fit exactly in the remaining viewport after the 5rem header on 1920×1080 */
  min-height: calc(100vh - 5rem);
  max-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
}

.hub-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(45deg, rgba(4, 27, 56, 0.58) 0%, rgba(15, 76, 129, 0.32) 50%, rgba(15, 23, 42, 0.16) 100%),
    url("../img/hub/hub_day.webp");
  background-position: center;
  background-size: cover;
  transform-origin: center;
  animation: hub-hero-media-in 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  pointer-events: none;
}

.hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.24)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="g" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.04)"/></pattern></defs><rect fill="url(%23g)" width="100" height="100"/></svg>');
  animation: hub-hero-overlay-in 1.1s ease-out 0.12s both;
  pointer-events: none;
}

html.js .hub-hero:not(.hub-hero-ready)::before,
html.js .hub-hero:not(.hub-hero-ready)::after {
  animation: none;
  opacity: 0;
}

html.js .hub-hero:not(.hub-hero-ready) .hub-hero-content h1,
html.js .hub-hero:not(.hub-hero-ready) .hub-hero-content p,
html.js .hub-hero:not(.hub-hero-ready) .hub-hero-actions-main,
html.js .hub-hero:not(.hub-hero-ready) .btn-hero-tertiary {
  animation: none;
  opacity: 0;
  transform: translateY(12px);
}

.dark .hub-hero {
  background: linear-gradient(135deg, #020617 0%, #0f172a 60%, #1e293b 100%);
}

.dark .hub-hero::after {
  background:
    linear-gradient(45deg, rgba(2, 6, 23, 0.72) 0%, rgba(15, 23, 42, 0.52) 52%, rgba(15, 23, 42, 0.30) 100%),
    url("../img/hub/hub_night.webp");
  background-position: center;
  background-size: cover;
}

.hub-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hub-hero-content h1,
.hub-hero-content p,
.hub-hero-actions-main,
.btn-hero-tertiary {
  animation: hub-hero-copy-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hub-hero-content h1 {
  animation-delay: 0.2s;
}

.hub-hero-content p {
  animation-delay: 0.36s;
}

.hub-hero-actions-main {
  animation-delay: 0.52s;
}

.btn-hero-tertiary {
  animation-delay: 0.66s;
}

.hub-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.hub-hero-actions-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.hub-hero .btn-primary-hub,
.hub-hero .btn-secondary-hub {
  min-width: 200px;
  padding: 0.85rem 1.5rem;
  border-radius: 0.625rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(8, 28, 64, 0.10);
}

.hub-hero .btn-primary-hub:hover,
.hub-hero .btn-secondary-hub:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(8, 28, 64, 0.16);
}

.hub-hero .btn-primary-hub:focus-visible,
.hub-hero .btn-secondary-hub:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.btn-hero-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.25rem;
  min-width: auto;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-hero-tertiary:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}

/* --- Pathway Selector --- */
.pathway-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.75rem;
  text-align: left;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.pathway-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.15);
}

.dark .pathway-card {
  background: #111827;
  border-color: #1e293b;
}

.dark .pathway-card:hover {
  border-color: #334155;
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.4);
}

.pathway-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.dark .pathway-icon-structured {
  background: transparent !important;
  color: #e5e7eb !important;
}

.dark .pathway-card:hover .pathway-icon-structured {
  color: #bfdbfe !important;
}

/* "When to use" list inside pathway cards */
.pathway-when-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.pathway-when-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

.dark .pathway-when-list li {
  color: #94a3b8;
}

.pathway-when-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

.dark .pathway-when-list li::before {
  background: #475569;
}

.hub-package-list {
  display: grid;
  gap: 0.75rem;
}

.hub-package-list-featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hub-package-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem 1.125rem 1rem 1.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
  overflow: hidden;
}

.hub-package-row:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 6px 16px -8px rgba(15, 23, 42, 0.12);
}

.dark .hub-package-row {
  background: #111827;
  border-color: #1e293b;
}

.dark .hub-package-row:hover {
  border-color: #334155;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}

.hub-package-row-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.package-theme-emerald .hub-package-row-accent { background: linear-gradient(180deg, #059669, #10b981); }
.package-theme-blue .hub-package-row-accent { background: linear-gradient(180deg, #2563eb, #3b82f6); }
.package-theme-indigo .hub-package-row-accent { background: linear-gradient(180deg, #4f46e5, #6366f1); }
.package-theme-slate .hub-package-row-accent { background: linear-gradient(180deg, #475569, #64748b); }
.package-theme-teal .hub-package-row-accent { background: linear-gradient(180deg, #0f766e, #14b8a6); }
.package-theme-green .hub-package-row-accent { background: linear-gradient(180deg, #16a34a, #22c55e); }

.hub-package-row-content {
  min-width: 0;
}

.hub-package-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.875rem;
  align-items: flex-start;
}

.hub-package-row-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
  color: #0f172a;
  overflow-wrap: anywhere;
}

.dark .hub-package-row-title {
  color: #f8fafc;
}

.hub-package-row-label {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f766e;
  background: #f0fdfa;
  border-radius: 9999px;
  padding: 0.22rem 0.55rem;
}

.dark .hub-package-row-label {
  background: rgba(20, 184, 166, 0.14);
  color: #5eead4;
}

.hub-package-row-problem,
.hub-package-row-format {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #475569;
  overflow-wrap: anywhere;
}

.hub-package-row-format {
  color: #64748b;
  font-size: 0.79rem;
}

.dark .hub-package-row-problem,
.dark .hub-package-row-format {
  color: #cbd5e1;
}

.hub-package-row-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.hub-package-row-chips span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.7rem;
  line-height: 1.3;
  padding: 0.18rem 0.5rem;
  overflow-wrap: anywhere;
  white-space: normal;
}

.dark .hub-package-row-chips span {
  background: rgba(15, 23, 42, 0.55);
  border-color: #334155;
  color: #cbd5e1;
}

.hub-package-row-action {
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 0.375rem;
  display: inline-flex;
}

.dark .hub-package-row-action {
  color: #93c5fd;
}

.hub-packages-link {
  padding: 0.625rem 1.25rem;
  font-size: 0.84rem;
  flex: 0 0 auto;
}

.hub-featured-packages {
  padding-top: 1.5rem !important;
}

@media (min-width: 640px) {
  .hub-featured-packages {
    padding-top: 2rem !important;
  }
}

@media (min-width: 768px) {
  .hub-featured-packages {
    padding-top: 2.5rem !important;
  }
}

.hub-capabilities {
  background: #ffffff;
}

.dark .hub-capabilities {
  background: #020617;
}

.hub-capability-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.hub-capability-shell > .hub-reveal {
  max-width: 42rem;
  text-align: center;
}

.hub-service-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
  max-width: 52rem;
}

.hub-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.82rem 0.95rem;
  border-radius: 0.5rem;
  background: white;
  border: 1px solid #e5e7eb;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 4rem;
}

.hub-service-link:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -6px rgba(15, 23, 42, 0.15);
}

.hub-service-link span[aria-hidden] {
  color: #94a3b8;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.hub-service-link:hover span[aria-hidden] {
  color: #2563eb;
}

.dark .hub-service-link {
  background: #111827;
  border-color: #1e293b;
  color: #f1f5f9;
}

.dark .hub-service-link:hover {
  border-color: #334155;
}

.dark .hub-service-link span[aria-hidden] {
  color: #475569;
}

.dark .hub-service-link:hover span[aria-hidden] {
  color: #60a5fa;
}

@media (max-width: 960px) {
  .hub-service-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .structured-flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===================================================================== */
/* --- Package Cards (redesigned with cover images) ---                   */
/* ===================================================================== */

.package-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.dark .package-card {
  background: #1e293b;
  border-color: #334155;
}

.dark .package-card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
}

/* --- Card Image --- */
.package-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.package-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.package-card:hover .package-card-image img {
  transform: scale(1.05);
}

.package-card-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 100%);
  pointer-events: none;
}

/* --- Theme accent line below image --- */
.package-theme-bar {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
}

/* Theme colors */
.package-theme-emerald .package-theme-bar,
.package-theme-emerald .package-card-image-overlay { background: linear-gradient(90deg, #059669, #10b981); }
.package-theme-blue .package-theme-bar,
.package-theme-blue .package-card-image-overlay { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.package-theme-indigo .package-theme-bar,
.package-theme-indigo .package-card-image-overlay { background: linear-gradient(90deg, #4f46e5, #6366f1); }
.package-theme-slate .package-theme-bar,
.package-theme-slate .package-card-image-overlay { background: linear-gradient(90deg, #475569, #64748b); }
.package-theme-teal .package-theme-bar,
.package-theme-teal .package-card-image-overlay { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.package-theme-green .package-theme-bar,
.package-theme-green .package-card-image-overlay { background: linear-gradient(90deg, #16a34a, #22c55e); }

/* Override the gradient overlay — use a subtle themed gradient instead of solid */
.package-card-image-overlay {
  height: 40%;
  opacity: 0.6;
}

/* --- Card Header --- */
.package-card-header {
  padding: 1.25rem 1.25rem 0;
}

.package-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1f2937;
  margin: 0;
  overflow-wrap: anywhere;
}

.dark .package-card-title {
  color: #f1f5f9;
}

.package-card-problem {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0.5rem 0 0;
  overflow-wrap: anywhere;
}

.dark .package-card-problem {
  color: #9ca3af;
}

.package-card-detail {
  margin: 0.75rem 0 0;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.dark .package-card-detail {
  color: #cbd5e1;
}

/* --- Card Body --- */
.package-card-body {
  padding: 0.875rem 1.25rem 0;
  flex: 1;
}

/* Deliverable row */
.package-deliverable {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #374151;
}

.dark .package-deliverable {
  color: #d1d5db;
}

.package-deliverable svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: #10b981;
}

/* --- Package Meta Tags --- */
.package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.package-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.1875rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: #f3f4f6;
  color: #4b5563;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.package-meta-tag svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.dark .package-meta-tag {
  background: #374151;
  color: #9ca3af;
}

.package-card-scope-note {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.dark .package-card-scope-note {
  border-color: #334155;
  color: #cbd5e1;
}

/* --- Card Footer (CTAs) --- */
.package-card-footer {
  padding: 1rem 1.25rem 1.25rem;
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
}

/* --- CTA Buttons --- */
.btn-primary-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  background: #1a4b8c;
  color: white;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary-hub:hover {
  background: #0d3a73;
  transform: translateY(-1px);
}

.btn-secondary-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: transparent;
  color: #1a4b8c;
  border: 1.5px solid #cbd5e1;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.btn-secondary-hub:hover {
  background: #1a4b8c;
  color: white;
  border-color: #1a4b8c;
}

.dark .btn-secondary-hub {
  color: #93c5fd;
  border-color: #475569;
}

.dark .btn-secondary-hub:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.btn-geotechnia {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.btn-geotechnia svg {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.btn-geotechnia:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
  transform: translateY(-1px);
}

.package-card-image-missing {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.dark .package-card-image-missing {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* --- Bridge Section --- */
.bridge-section {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.dark .bridge-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-color: #334155;
}

.bridge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: white;
  color: #1e40af;
  border: 1px solid #dbeafe;
  transition: all 0.2s;
  text-decoration: none;
}

.bridge-tag:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.dark .bridge-tag {
  background: #1e293b;
  color: #93c5fd;
  border-color: #334155;
}

.dark .bridge-tag:hover {
  background: #334155;
  border-color: #3b82f6;
}

/* --- Structured Solutions Flow --- */
.structured-flow {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 16px 40px -28px rgba(15, 23, 42, 0.35);
}

.dark .structured-flow {
  background: #111827;
  border-color: #334155;
  box-shadow: 0 18px 48px -30px rgba(0, 0, 0, 0.7);
}

.structured-flow-kicker {
  margin: 0 0 0.5rem;
  color: #0f766e;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.structured-flow-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.dark .structured-flow-title {
  color: #f8fafc;
}

.structured-flow-subtitle {
  max-width: 42rem;
  margin: 0.75rem auto 1.75rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.dark .structured-flow-subtitle {
  color: #cbd5e1;
}

.structured-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.structured-flow-step {
  min-height: 11rem;
  padding: 1rem;
  border-radius: 0.625rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.dark .structured-flow-step {
  background: rgba(15, 23, 42, 0.7);
  border-color: #334155;
}

.structured-flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: #0c2d5a;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.structured-flow-step h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.dark .structured-flow-step h3 {
  color: #f8fafc;
}

.structured-flow-step p {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.79rem;
  line-height: 1.5;
}

.dark .structured-flow-step p {
  color: #cbd5e1;
}

/* --- Final CTA Band --- */
.final-cta-band {
  background: linear-gradient(135deg, #0c2d5a 0%, #1a4b8c 100%);
}

.dark .final-cta-band {
  background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

/* --- Reveal animations --- */
.hub-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hub-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.package-page-intro .hub-reveal:first-child {
  transition-delay: 0.05s;
}

.package-page-intro .hub-reveal:nth-child(2) {
  transition-delay: 0.17s;
}

/* --- Staggered reveal for package grid items --- */
.package-card.hub-reveal:nth-child(1) { transition-delay: 0.08s; }
.package-card.hub-reveal:nth-child(2) { transition-delay: 0.15s; }
.package-card.hub-reveal:nth-child(3) { transition-delay: 0.22s; }
.package-card.hub-reveal:nth-child(4) { transition-delay: 0.29s; }
.package-card.hub-reveal:nth-child(5) { transition-delay: 0.36s; }
.package-card.hub-reveal:nth-child(6) { transition-delay: 0.43s; }

.structured-flow > .hub-reveal:nth-child(1) { transition-delay: 0.05s; }
.structured-flow > .hub-reveal:nth-child(2) { transition-delay: 0.12s; }
.structured-flow > .hub-reveal:nth-child(3) { transition-delay: 0.19s; }

.structured-flow-grid .hub-reveal:nth-child(1) { transition-delay: 0.26s; }
.structured-flow-grid .hub-reveal:nth-child(2) { transition-delay: 0.33s; }
.structured-flow-grid .hub-reveal:nth-child(3) { transition-delay: 0.40s; }
.structured-flow-grid .hub-reveal:nth-child(4) { transition-delay: 0.47s; }

/* --- Home "Soluciones segun requerimiento" reveal choreography --- */
/* Title + subtitle act as the lead-in before the cards cascade. */
.home-needs-section h2.hub-reveal { transition-delay: 0s; }
.home-needs-section p.hub-reveal  { transition-delay: 0.1s; }

/* Higher specificity than the bare .home-package-card rule below, so the
   reveal transition (opacity + transform) is not overridden by the hover
   transition. Without this, opacity pops in instantly. */
.home-package-card.hub-reveal {
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.24s ease,
              border-color 0.24s ease;
}

/* Staggered cascade, picking up after the title/subtitle lead-in. */
#home-packages-grid .home-package-card.hub-reveal:nth-child(1) { transition-delay: 0.18s; }
#home-packages-grid .home-package-card.hub-reveal:nth-child(2) { transition-delay: 0.26s; }
#home-packages-grid .home-package-card.hub-reveal:nth-child(3) { transition-delay: 0.34s; }
#home-packages-grid .home-package-card.hub-reveal:nth-child(4) { transition-delay: 0.42s; }
#home-packages-grid .home-package-card.hub-reveal:nth-child(5) { transition-delay: 0.50s; }
#home-packages-grid .home-package-card.hub-reveal:nth-child(6) { transition-delay: 0.58s; }

/* CTA "Ver mas detalles" closes the section's choreography: it stays hidden
   until the cards have cascaded, then rises in as the final beat. Driven by a
   keyframe (not a transition) so the animation-delay does NOT also delay the
   hover feedback. fill-mode: backwards holds the "from" state during the delay;
   after the animation the element rests on the .hub-reveal.revealed style, so
   the hover transform/background transition stays snappy. */
.home-needs-section .btn-primary-hub.hub-reveal {
  transition: background 0.2s ease, transform 0.15s ease;
}

.home-needs-section .btn-primary-hub.hub-reveal.revealed {
  animation: gt-btn-reveal 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s backwards;
}

@keyframes gt-btn-reveal {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.home-package-card {
  position: relative;
  display: block;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.875rem;
  padding: 1rem 1rem 1.0625rem;
  text-decoration: none;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  overflow: hidden;
}

.home-package-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(15, 23, 42, 0.45);
  border-color: #cbd5e1;
}

.dark .home-package-card {
  background: #111827;
  border-color: #334155;
}

.dark .home-package-card:hover {
  border-color: #475569;
  box-shadow: 0 16px 32px -22px rgba(0, 0, 0, 0.7);
}

.home-package-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.package-theme-emerald .home-package-card-accent { background: linear-gradient(90deg, #059669, #10b981); }
.package-theme-blue .home-package-card-accent { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.package-theme-indigo .home-package-card-accent { background: linear-gradient(90deg, #4f46e5, #6366f1); }
.package-theme-slate .home-package-card-accent { background: linear-gradient(90deg, #475569, #64748b); }
.package-theme-teal .home-package-card-accent { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.package-theme-green .home-package-card-accent { background: linear-gradient(90deg, #16a34a, #22c55e); }

.home-package-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.home-package-card-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.dark .home-package-card-kicker {
  color: #94a3b8;
}

.home-package-card-arrow {
  font-size: 1rem;
  color: #2563eb;
}

.dark .home-package-card-arrow {
  color: #60a5fa;
}

.home-package-card-title {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dark .home-package-card-title {
  color: #f8fafc;
}

.home-package-card-problem {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
  margin: 0;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dark .home-package-card-problem {
  color: #cbd5e1;
}

.home-package-card-meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  color: #0f766e;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.45;
}

.dark .home-package-card-meta {
  border-color: #334155;
  color: #5eead4;
}

/* ===================================================================== */
/* --- Responsive ---                                                     */
/* ===================================================================== */

@media (max-width: 640px) {
  .hub-capability-shell,
  .hub-service-map {
    grid-template-columns: 1fr;
  }

  .structured-flow-grid {
    grid-template-columns: 1fr;
  }

  .structured-flow-step {
    min-height: auto;
  }

  .hub-service-map {
    max-width: 100%;
  }

  .hub-package-list-featured,
  .hub-package-row {
    grid-template-columns: 1fr;
  }

  .hub-package-row-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .package-card-image {
    height: 150px;
  }

  .package-card-header {
    padding: 1rem 1rem 0;
  }

  .package-card-body {
    padding: 0.75rem 1rem 0;
  }

  .package-card-footer {
    padding: 0.875rem 1rem 1rem;
    flex-direction: column;
  }

  .pathway-card {
    padding: 1.25rem;
  }

  .hub-hero .btn-primary-hub,
  .hub-hero .btn-secondary-hub {
    width: min(100%, 20rem);
    min-width: 0;
  }

  .hub-hero-actions-main {
    width: min(100%, 22rem);
    flex-direction: column;
    align-items: center;
  }

  .btn-hero-tertiary {
    width: auto;
    padding-top: 0.1rem;
  }

  .hub-hero {
    min-height: 34rem;
  }

  .hub-hero::after {
    background-position: center top;
  }

  .hub-hero-content {
    transform: translateY(-1rem);
  }

  .btn-geotechnia,
  .package-card-footer .btn-secondary-hub {
    width: 100%;
    justify-content: center;
  }

  .hub-capability-shell {
    gap: 1.5rem;
  }
}

/* Keep package photos readable; theme color should live on the accent bar, not on the image overlay. */
.package-card-image-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%) !important;
  height: 50%;
  opacity: 1;
}

#home-packages-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  #home-packages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #home-packages-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero::before,
  .hub-hero::after,
  .hub-hero-content h1,
  .hub-hero-content p,
  .hub-hero-actions-main,
  .btn-hero-tertiary,
  .hub-reveal {
    animation: none !important;
    transition: none !important;
  }

  .hub-hero::after,
  .hub-hero-content h1,
  .hub-hero-content p,
  .hub-hero-actions-main,
  .btn-hero-tertiary,
  .hub-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
