/* Ctrell Designs — Component Styles */

/* Navigation */
.nav-link {
  position: relative;
  color: #475569;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #4f46e5;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Service card icon */
.service-icon-wrap {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15), rgba(124, 58, 237, 0.1));
}

/* Team card */
.team-card img {
  transition: transform 0.5s ease;
}

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

/* Pricing card featured */
.pricing-card.featured {
  border: 2px solid #4f46e5;
  position: relative;
  transform: scale(1.02);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border-radius: 9999px;
  background: var(--gradient-hero);
}

/* Blog card */
.blog-card .blog-image {
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-image {
  transform: scale(1.08);
}

/* Portfolio card */
.portfolio-card {
  position: relative;
}

/* Portfolio overlay — hidden until hover, then solid dark with white text */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: rgba(8, 10, 14, 0.95);
  overflow: hidden;
}

/* The hover text is capped at 100 characters in the template; these
   clamps are a backstop so a long title can never push the text out
   of the tile. */
.portfolio-overlay h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portfolio-overlay p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portfolio-card:hover .portfolio-overlay,
.portfolio-card:focus-within .portfolio-overlay {
  opacity: 1;
}

/* Touch devices have no hover — keep the overlay text visible. */
@media (hover: none) {
  .portfolio-overlay {
    opacity: 1;
  }
}

/* Blog pagination as buttons (home.php + the_posts_pagination). */
.navigation.pagination {
  margin-top: 3rem;
}
.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e0e3e5;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s ease;
}
.navigation.pagination a.page-numbers:hover {
  border-color: rgba(129, 140, 248, 0.7);
  color: #fff;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.35);
}
.navigation.pagination .page-numbers.current {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-color: transparent;
  color: #fff;
}
.navigation.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  min-width: 0;
  padding: 0 0.25rem;
}

/* CTA banner: the outline button uses white border + white text. */
.cta-banner .btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}
.cta-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* FAQ accordion (also in kinetic-ether.css — repeated here so the
   toggle keeps working even if that file is cached old). FAQs are
   native <details>/<summary> elements, so they open with no
   JavaScript at all; [open] is the source of truth, .active is kept
   in step by main.js when it runs. */
.faq-item .faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding-top: 0;
}
.faq-item.active .faq-answer,
.faq-item[open] .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding-top: 0;
  padding-bottom: 1.5rem;
}
.faq-item.active .faq-icon,
.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}
/* Hide the browser's own disclosure triangle on <summary> — the
   .faq-icon chevron is the visual indicator. */
.faq-item > .faq-trigger {
  list-style: none;
}
.faq-item > .faq-trigger::-webkit-details-marker {
  display: none;
}

/* Footer wordmark: never clip at the viewport edge on narrow screens. */
footer .text-headline-xl {
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  footer .text-headline-xl {
    font-size: 2.25rem;
    line-height: 1.1;
  }
}

/* Footer */
.footer-link {
  color: #94a3b8;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #fff;
}

/* Blog single post — Tailwind's typography plugin is not loaded, so
   the article body gets its own readable styles here. */
.ctrell-post-content {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.8;
}
.ctrell-post-content h2 {
  color: #e0e3e5;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.9rem;
}
.ctrell-post-content h3 {
  color: #e0e3e5;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
}
.ctrell-post-content p {
  margin: 0 0 1.15rem;
}
.ctrell-post-content ul,
.ctrell-post-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}
.ctrell-post-content ul {
  list-style: disc;
}
.ctrell-post-content ol {
  list-style: decimal;
}
.ctrell-post-content li {
  margin-bottom: 0.5rem;
}
.ctrell-post-content li::marker {
  color: #a5b4fc;
}
.ctrell-post-content a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ctrell-post-content a:hover {
  color: #c7d2fe;
}
.ctrell-post-content strong {
  color: #e0e3e5;
}
.ctrell-post-content blockquote {
  border-left: 3px solid #4f46e5;
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: #e0e3e5;
  font-style: italic;
}
.ctrell-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 640px) {
  .ctrell-post-content {
    font-size: 1rem;
  }
  .ctrell-post-content h2 {
    font-size: 1.4rem;
  }
}

/* Form inputs */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Newsletter */
.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem 0 0 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.newsletter-input:focus {
  outline: none;
  border-color: #4f46e5;
}

/* Hamburger */
.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #1e293b;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Dashboard mockup float */
.mockup-float {
  animation: mockupFloat 6s ease-in-out infinite;
}

@keyframes mockupFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-15px) rotate(1deg); }
}

/* Floating card in hero */
.floating-card {
  animation: cardFloat 5s ease-in-out infinite;
}

.floating-card:nth-child(2) { animation-delay: 1s; }
.floating-card:nth-child(3) { animation-delay: 2s; }

@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Before/After slider */
.before-after {
  position: relative;
  overflow: hidden;
}

.before-after .after-layer {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

/* Career badge */
.career-badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #4338ca;
}

/* Breadcrumb */
.breadcrumb a {
  color: #64748b;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #4f46e5;
}

/* CTA banner */
.cta-banner {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
