/* =====================================================
   COMPONENT STYLES - Majuí Arquitetura
   Reusable UI components and interactive elements
   ===================================================== */

/* Project Cards */
.project-card {
  position: relative;
  transition: transform var(--transition-medium);
  cursor: pointer;
}

.project-card:hover {
  transform: scale(1.01);
}

.project-card__image-link {
  display: block;
  text-decoration: none;
}

.project-card__image-wrapper {
  position: relative;
  overflow: hidden;
}

.project-card__thumb {
  aspect-ratio: 4/5;
  background: var(--neutral-warm);
  border-radius: 0;
  margin-bottom: var(--space-sm);
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, #d4cfc4 0%, #c3bfb5 100%);
  width: 100%;
  height: auto;
  object-fit: cover;
  max-width: 500px;
  display: block;
}

.project-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(170, 89, 23, 0);
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.project-card:hover .project-card__overlay {
  background-color: rgba(170, 89, 23, 0.5);
}

/* Placeholder text for project thumbnails */
.project-card__thumb::after {
  content: 'Project Image\A400×300px\A' attr(aria-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.4);
  text-align: center;
  white-space: pre-line;
  font-size: 12px;
  font-family: var(--font-body);
}

.project-card__caption {
  font-size: var(--text-small);
  color: var(--text-muted);
  line-height: 1.4;
}

.project-card__caption em {
  font-style: italic;
  font-weight: 400;
}

.project-card__link {
  color: #6B929E;
  font-family: var(--font-montserrat);
  font-weight: 500;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.project-card:hover .project-card__link {
  color: var(--accent-terracotta);
  text-decoration: underline;
  text-decoration-color: var(--accent-terracotta);
  text-underline-offset: 2px;
}

/* Numbered Service Cards */
.numbered-service__thumb {
  aspect-ratio: 5/3;
  background: var(--neutral-warm);
  border-radius: 0;
  margin-bottom: var(--space-sm);
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, #d4cfc4 0%, #c3bfb5 100%);
}

/* Placeholder text for numbered service thumbnails */
.numbered-service__thumb::after {
  content: 'Service Image\A500×300px\A' attr(aria-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.4);
  text-align: center;
  white-space: pre-line;
  font-size: 12px;
  font-family: var(--font-body);
}

.numbered-service__card:hover .numbered-service__thumb {
  transform: scale(1.01);
  transition: transform var(--transition-medium);
}

/* CTA Team Photo */
.cta-team__image {
  width: 100%;
  height: 100%;
  background: var(--neutral-warm);
  border-radius: 0;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, #d4cfc4 0%, #c3bfb5 100%);
}

/* Placeholder for team photo */
.cta-team__image::after {
  content: 'Team Photo\A3:4 aspect ratio\ATwo professionals smiling';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.4);
  text-align: center;
  white-space: pre-line;
  font-size: 12px;
  font-family: var(--font-body);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 44px;
  justify-content: center;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--accent-terracotta);
  color: var(--accent-terracotta);
}

.btn--outline:hover {
  background: var(--accent-terracotta);
  color: var(--text-light);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(161, 110, 70, 0.2);
}

.btn--outline:focus-visible {
  outline: 2px solid var(--accent-terracotta);
  outline-offset: 2px;
}

.btn__icon {
  font-size: 16px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn__icon {
  transform: translateX(2px);
}

/* Decorative Elements */
.decoration-line {
  width: 120px;
  height: 1px;
  background: var(--deep-slate-op-30);
  margin: var(--space-md) 0;
}

.decoration-arabesque {
  width: 24px;
  height: 16px;
  opacity: 0.6;
  color: var(--accent-terracotta);
}

/* Animation Classes */
@media (prefers-reduced-motion: no-preference) {
  .stagger-children > * {
    animation-delay: calc(var(--stagger-delay, 0) * 60ms);
  }
  
  .scale-on-hover {
    transition: transform var(--transition-medium);
  }
  
  .scale-on-hover:hover {
    transform: scale(1.02);
  }
  
  .fade-up-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
  }
  
  .fade-up-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus Management */
.focus-visible {
  outline: 2px solid var(--accent-terracotta);
  outline-offset: 2px;
  border-radius: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .project-card__thumb,
  .numbered-service__thumb,
  .cta-team__image {
    border: 2px solid currentColor;
  }
  
  .btn--outline {
    border-width: 2px;
  }
  
  .service-item {
    border-bottom-width: 2px;
  }
}

/* Print Styles */
@media print {
  .hero {
    height: 100vh;
    min-height: 200px;
    page-break-inside: avoid;
  }
  
  .hero__bg::after {
    display: none;
  }
  
  .btn {
    border: 1px solid currentColor;
    page-break-inside: avoid;
  }
  
  .service-item__content {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
  }
  
  .mockup-overlay {
    display: none !important;
  }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: var(--steel-blue); /* Medium blue from palette */
  color: var(--text-light); /* Off-white icon */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(50, 70, 80, 0.2);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.whatsapp-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.whatsapp-float.is-visible:hover {
  opacity: 1;
  transform: translateY(-4px);
  background-color: var(--deep-slate); /* Slightly darker blue on hover */
  box-shadow: 0 8px 20px rgba(50, 70, 80, 0.3);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}
