/**
 * Subservice / Services page template styles.
 *
 * @package Innov8th
 */

.subservice-section {
  padding: 1.5rem 0 5rem;
  position: relative;
  color: white;
  text-align: center;
}

.service-area-detail-main .subservice-section,
body.is-service-area-hub .subservice-section {
  padding-top: 2rem;
}

.subservice-header {
  margin-bottom: 4rem;
}

.subservice-header .sub-heading {
  letter-spacing: 2px;
}

.subservice-browse-nav {
  display: block;
  width: 100%;
}

.subservice-header .heading {
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.subservice-header p {
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.8;
  line-height: 1.6;
}

.subservice-nav-container {
  border-radius: 30px;
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.subservice-nav-inner {
  width: 100%;
}

.subservice-search {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
}

.subservice-search input {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  width: 100%;
  padding: 5px 10px;
  outline: none;
}

.subservice-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.subservice-search .search-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.subservice-search .search-btn svg {
  width: 24px;
  height: 24px;
  opacity: 0.8;
}

.subservice-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.category-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-row > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 8px 24px;
  border-radius: 50px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.category-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.category-tab.is-active {
  background: #ff00c8;
  border-color: #ff00c8;
  box-shadow: 0 0 20px rgba(255, 0, 200, 0.4);
}

.subservice-card {
  border-radius: 40px;
  padding: 60px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.subservice-card-inner {
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

.subservice-card-left {
  flex: 1.5;
}

.subservice-card-right {
  flex: 1;
}

.subservice-card .card-title {
  font-size: 3rem;
  font-family: "ibr", sans-serif;
  margin-bottom: 30px;
  line-height: 1.1;
}

.card-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
}

/* Block editor / HTML content in the main column */
.subservice-page-content {
  text-align: left;
}

.subservice-page-content > *:last-child {
  margin-bottom: 0;
}

.subservice-page-content p,
.subservice-page-content li {
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.subservice-page-content p {
  margin-bottom: 20px;
}

.subservice-page-content ul,
.subservice-page-content ol {
  margin: 0 0 20px 1.25em;
  padding: 0;
  text-align: left;
}

.subservice-page-content h2,
.subservice-page-content h3,
.subservice-page-content h4 {
  color: rgba(255, 255, 255, 0.95);
  margin: 1.25em 0 0.75em;
}

.subservice-page-content h2:first-child,
.subservice-page-content h3:first-child,
.subservice-page-content h4:first-child {
  margin-top: 0;
}

.cta-box {
  background: rgba(0, 0, 0, 0.3);
  border-left: 2px solid #ff00c8;
  padding: 40px;
  border-radius: 0 30px 30px 0;
}

.cta-box h3 {
  font-size: 1.8rem;
  font-family: "ibr", sans-serif;
  margin-bottom: 25px;
  line-height: 1.2;
}

.check-list {
  list-style: none;
  margin-bottom: 35px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.check-icon {
  color: #ff00c8;
  font-weight: bold;
  font-size: 1.2rem;
}

.card-decoration-top {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at top right, rgba(255, 0, 200, 0.15), transparent 70%);
  pointer-events: none;
}

.card-decoration-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at bottom left, rgba(123, 77, 255, 0.15), transparent 70%);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .subservice-card-inner {
    flex-direction: column;
    gap: 40px;
  }
  .subservice-card .card-title {
    font-size: 2.5rem;
  }
  .subservice-card {
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .subservice-section {
    padding: 1.25rem 0 4rem;
  }
  .subservice-card .card-title {
    font-size: 2rem;
  }
  .cta-box {
    padding: 25px;
  }
  .category-tab {
    padding: 6px 18px;
    font-size: 0.8rem;
  }
}

.service-content-section {
  transition: opacity 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(10px);
  display: none;
}

.service-content-section.is-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Hub: hide empty card slot until a subservice is loaded via SPA */
.subservice-content-container.subservice-content-container--hub-hidden {
  display: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.subservice-content-container.subservice-content-container--hub-hidden.is-loading {
  display: block;
  min-height: 12rem;
  margin-top: 1rem;
}

/* AJAX swap: loading overlay on main card region */


.subservice-content-container.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: 40px;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.subservice-content-container.is-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 2.5rem;
  height: 2.5rem;
  margin: -1.25rem 0 0 -1.25rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff00c8;
  border-radius: 50%;
  animation: innov8th-subservice-spin 0.75s linear infinite;
  pointer-events: none;
}

@keyframes innov8th-subservice-spin {
  to {
    transform: rotate(360deg);
  }
}
