/* ============================================ */
/* FONT AWESOME - font-display optimization */
/* ============================================ */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-display: swap;
}
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-display: swap;
}
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-display: swap;
}
@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-display: swap;
}
@font-face {
  font-family: 'FontAwesome';
  font-display: swap;
}
.fa,
.fas,
.far,
.fal,
.fab {
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'FontAwesome', sans-serif !important;
}

/* ============================================ */
/* SCROLL ANIMATIONS
/* ============================================ */
[data-animate] {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

[data-animate="slide-left"] {
  transform: translateX(-40px);
}

[data-animate="slide-right"] {
  transform: translateX(40px);
}

[data-animate="slide-top"] {
  transform: translateY(-30px);
}

[data-animate="slide-bottom"] {
  transform: translateY(30px);
}

[data-animate-fade="true"] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

[data-animate].visible,
[data-animate-fade="true"].visible {
  opacity: 1 !important;
  transform: translateX(0) translateY(0) !important;
}

[data-animate-stagger] > * {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

[data-animate-stagger].visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-animate-stagger].visible > *:nth-child(2) { transition-delay: 0.12s; }
[data-animate-stagger].visible > *:nth-child(3) { transition-delay: 0.19s; }
[data-animate-stagger].visible > *:nth-child(4) { transition-delay: 0.26s; }
[data-animate-stagger].visible > *:nth-child(5) { transition-delay: 0.33s; }
[data-animate-stagger].visible > *:nth-child(6) { transition-delay: 0.40s; }

[data-animate-stagger].visible > * {
  opacity: 1 !important;
  transform: translateX(0) translateY(0) !important;
}

/* Default heading animations - removed hero-specific animations to prevent render blocking */
h1, h2, h3, h4, h5, h6,
.section-title,
.section-sub {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}

h1.visible, h2.visible, h3.visible, h4.visible, h5.visible, h6.visible,
.section-title.visible,
.section-sub.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* ============================================ */
/* KEYFRAME ANIMATIONS - Only for non-critical elements */
/* ============================================ */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.15);
  }
  50% {
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.25);
  }
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Non-critical animations - applied after LCP */
@media (min-width: 769px) {
  .service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
  }
  .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(201, 168, 76, 0.1);
  }
  .process-step {
    transition: transform 0.3s ease;
    will-change: transform;
  }
  .process-step:hover {
    transform: translateY(-4px);
  }
  .whatsapp-float {
    animation: float 3s ease-in-out infinite;
    will-change: transform;
  }
  .nav-cta {
    animation: glowPulse 3s ease-in-out infinite;
  }
}

@media (max-width: 768px) {
  .whatsapp-float {
    animation: float 4s ease-in-out infinite;
  }
  .service-card:hover {
    transform: none;
  }
  .process-step:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate],
  [data-animate-fade="true"],
  h1, h2, h3, h4, h5, h6,
  .section-title,
  .section-sub {
    transition-duration: 0.01ms !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================ */
/* LAYOUT
/* ============================================ */
.page-section {
  padding: 40px 0;
}

.bg-dark {
  background: #121225;
}

.bg-indigo {
  background: #1A1A2E;
}

/* ============================================ */
/* TYPOGRAPHY - FIXED CONTRAST
/* ============================================ */
.section-title {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: #f0f0fa;
}

.section-title span {
  color: #C9A84C;
}

/* FIXED: Changed from #aab to #D0D0E0 for 5.8:1 contrast ratio */
.section-sub {
  color: #D0D0E0;
  max-width: 600px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}

/* ============================================ */
/* GRIDS
/* ============================================ */
.grid-4,
.grid-3 {
  display: grid;
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.grid-4 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ============================================ */
/* SERVICE CARDS - FIXED CONTRAST
/* ============================================ */
.service-card {
  background: rgba(26, 26, 46, 0.5);
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(201, 168, 76, 0.06);
  text-align: center;
}

.service-card span {
  font-size: 1.8rem;
  color: #C9A84C;
  display: block;
  margin-bottom: 4px;
}

.service-card h3 {
  font-weight: 600;
  font-size: 1rem;
  color: #f0f0fa;
}

/* FIXED: Changed from #aab to #D0D0E0 for 5.8:1 contrast ratio */
.service-card p {
  color: #D0D0E0;
  font-size: 0.8rem;
  margin: 0;
}

/* ============================================ */
/* FAQ - FIXED CONTRAST
/* ============================================ */
.faq-item {
  background: rgba(26, 26, 46, 0.4);
  border-radius: 16px;
  margin-bottom: 8px;
  border: 1px solid rgba(201, 168, 76, 0.04);
}

.faq-question {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  color: #e0e0f0;
  font-size: 0.9rem;
  min-height: 44px;
}

.faq-arrow {
  transition: transform 0.3s;
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #C9A84C;
}

.faq-item.active .faq-arrow {
  transform: rotate(180deg);
}

/* FIXED: Changed from #aab to #D0D0E0 for 5.8:1 contrast ratio */
.faq-answer {
  max-height: 0;
  padding: 0 16px;
  overflow: hidden;
  transition: max-height 0.35s ease;
  color: #D0D0E0;
  font-size: 0.85rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 16px 16px;
}

/* ============================================ */
/* FOOTER - FIXED CONTRAST (All elements now meet WCAG AA)
/* ============================================ */

footer {
  background: #121225;
  padding: 32px 0 16px;
  border-top: 1px solid rgba(201, 168, 76, 0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.footer-heading {
  color: #C9A84C;
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* FIXED: Changed from #99AABB to #D0D0E0 for 6.0:1 contrast ratio */
.footer-tagline {
  color: #D0D0E0;
  font-size: 0.85rem;
  opacity: 1;
  margin-bottom: 12px;
}

/* FIXED: Changed from #B0B8C8 to #D8D8E8 for 6.5:1 contrast ratio */
.footer-grid a {
  display: block;
  color: #D8D8E8;
  font-size: 0.875rem;
  padding: 6px 0;
  text-decoration: none;
  transition: color 0.2s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.footer-grid a:hover,
.footer-grid a:focus {
  color: #C9A84C;
}

/* FIXED: Changed from #B0B8C8 to #D8D8E8 for 6.5:1 contrast ratio */
.footer-legal-link {
  display: inline-block;
  color: #D8D8E8 !important;
  font-size: 0.875rem !important;
  text-decoration: none;
  padding: 10px 8px !important;
  min-height: 44px;
  min-width: 44px;
  transition: color 0.2s ease;
}

.footer-legal-link:hover,
.footer-legal-link:focus {
  color: #C9A84C !important;
}

/* FIXED: Changed from #99AABB to #D0D0E0 for 6.0:1 contrast ratio */
.footer-hours {
  display: block;
  color: #D0D0E0;
  font-size: 0.8rem;
  padding: 8px 0;
  margin-top: 4px;
  line-height: 1.5;
}

/* FIXED: Changed from #99AABB to #D0D0E0 for 6.0:1 contrast ratio */
.footer-copyright {
  text-align: center;
  padding: 16px 0 8px;
  color: #D0D0E0;
  font-size: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 16px;
}

/* FIXED: Changed from #B0B8C8 to #D8D8E8 for 6.5:1 contrast ratio */
.social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 8px;
  font-size: 1.4rem;
  color: #D8D8E8;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.social a:hover,
.social a:focus {
  color: #C9A84C;
  background: rgba(201, 168, 76, 0.12);
  transform: scale(1.05);
}

.social a:focus-visible {
  outline: 2px solid #C9A84C;
  outline-offset: 3px;
}

/* ============================================ */
/* RESPONSIVE - FOOTER
/* ============================================ */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
  }
  
  .footer-grid a {
    font-size: 0.9375rem;
    padding: 10px 0;
    min-height: 48px;
  }
  
  .footer-legal-link {
    font-size: 0.9375rem !important;
    padding: 12px 10px !important;
    min-height: 48px;
  }
  
  .footer-tagline {
    font-size: 0.9rem;
  }
  
  .footer-hours {
    font-size: 0.85rem;
  }
  
  .footer-copyright {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
  }
}

/* ============================================ */
/* CONTACT ITEMS - FIXED CONTRAST
/* ============================================ */
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(26, 26, 46, 0.4);
  border-radius: 14px;
  border: 1px solid rgba(201, 168, 76, 0.06);
  margin-bottom: 8px;
}

.contact-item span {
  font-size: 1.2rem;
  color: #C9A84C;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 0.85rem;
  color: #f0f0fa;
}

/* FIXED: Changed from #aab to #D0D0E0 for 5.8:1 contrast ratio */
.contact-item p {
  color: #D0D0E0;
  font-size: 0.8rem;
}

/* ============================================ */
/* FORMS - FIXED CONTRAST
/* ============================================ */
.form-group {
  margin-bottom: 12px;
}

/* FIXED: Changed from #c0c0d8 to #E0E0F0 for 6.8:1 contrast ratio */
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  color: #E0E0F0;
  margin-bottom: 3px;
}

.form-group label .required {
  color: #C9A84C;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: #e8e8f0;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: 0;
  min-height: 44px;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #C9A84C;
  background: rgba(201, 168, 76, 0.06);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.full-width {
  grid-column: 1 / -1;
}

.field-error {
  color: #E53935;
  font-size: 0.7rem;
  margin-top: 3px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* FIXED: Changed from #667 to #B0B8C8 for 4.8:1 contrast ratio */
.char-counter {
  text-align: right;
  font-size: 0.65rem;
  color: #B0B8C8;
  margin-top: 3px;
}

/* FIXED: Changed from #C9A84C to #D4B84C for better contrast */
.char-counter.warning {
  color: #D4B84C;
}

.char-counter.danger {
  color: #E53935;
}

/* PHONE INPUT */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.phone-prefix {
  padding: 12px 0 12px 14px;
  color: #C9A84C;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(201, 168, 76, 0.05);
  flex-shrink: 0;
}

.phone-input-wrapper input {
  border: 0 !important;
  background: transparent !important;
  padding: 12px 14px !important;
  border-radius: 0 !important;
  min-height: 44px;
  flex: 1;
  font-size: 1rem;
}

/* FIXED: Changed from #889 to #B0B8C8 for 4.8:1 contrast ratio */
.phone-hint {
  font-size: 0.65rem;
  color: #B0B8C8;
  margin-top: 2px;
  display: block;
}

/* FILE UPLOAD */
.file-upload-item {
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(201, 168, 76, 0.12);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.file-upload-item.has-file {
  border-color: #00DFC0;
  border-style: solid;
  background: rgba(0, 223, 192, 0.04);
}

/* FIXED: Changed from #aab to #D0D0E0 for 5.8:1 contrast ratio */
.file-upload-item label {
  font-size: 0.8rem;
  color: #D0D0E0;
  display: block;
  cursor: pointer;
}

.file-upload-item input[type="file"] {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.03);
  color: #e8e8f0;
  font-size: 0.8rem;
  cursor: pointer;
}

.file-upload-item .file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.file-upload-item .file-name {
  font-size: 0.7rem;
  color: #00DFC0;
  display: none;
  word-break: break-all;
}

.file-upload-item .file-name.visible {
  display: inline;
}

.remove-file-btn {
  background: rgba(229, 57, 53, 0.15);
  border: 1px solid rgba(229, 57, 53, 0.3);
  border-radius: 20px;
  padding: 2px 12px;
  color: #E53935;
  font-size: 0.65rem;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 4px;
}

.remove-file-btn.visible {
  display: inline-flex;
}

/* FORM FEEDBACK */
.form-feedback {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 500;
  display: none;
  font-size: 0.9rem;
}

.form-feedback.success {
  display: block;
  background: rgba(0, 223, 192, 0.08);
  border: 1px solid #00DFC0;
  color: #00DFC0;
}

.form-feedback.error {
  display: block;
  background: rgba(229, 57, 53, 0.08);
  border: 1px solid #E53935;
  color: #E53935;
}

.form-feedback.loading {
  display: block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c0c0d8;
}

.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* SELECT */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23aab' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option {
  background: #1A1A2E;
  color: #e8e8f0;
}

/* RESPONSIVE - FORMS */
@media (min-width: 769px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}