/* assets/css/components.css */

/* Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-dark {
  background-color: var(--color-text-main);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.85rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 0; /* Removed 1px border artifact */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  will-change: transform, background-color, color;
  text-decoration: none;
}

.btn-dark::before {
  content: '';
  position: absolute;
  top: -1px; /* Slight bleed to cover edges */
  left: -1px;
  right: -1px;
  bottom: -1px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
  will-change: transform;
}

.btn-wrapper:hover .btn-dark {
  color: var(--color-text-main);
  background-color: #fff; /* Match hover fill to prevent bleed */
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-wrapper:hover .btn-dark::before {
  transform: scaleX(1);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-dark .icon-draw {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-wrapper:hover .btn-dark .icon-draw {
  transform: translateX(8px) rotate(15deg);
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Size Variations */
.btn-xl {
  padding: 1.25rem 3.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-xl .icon-draw {
  width: 22px;
  height: 22px;
}

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

.btn-outline:hover {
  background-color: var(--color-bg-alt);
}

/* Header Navbar */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 50;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 50px;
  height: 50px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover .logo-icon svg {
  transform: rotate(45deg);
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-text-main);
  position: relative;
  transition: color 0.4s ease;
}

.brand-name::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-text-main);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo:hover .brand-name::after {
  width: 100%;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  color: var(--color-text-muted);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-text-main);
}

.mobile-menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
  }
  
  .main-nav.is-open {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .mobile-menu-toggle {
    display: block;
    width: 24px;
    height: 24px;
  }
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Footer: Rounded Card System (Hero-Mirror Style) */
.site-footer {
  padding: 0 0 2rem 0; /* Tightened top to blend with previous section */
  background-color: var(--color-bg-main);
}

.footer-card {
  background-color: var(--color-text-main);
  color: var(--color-bg-main);
  border-radius: 40px;
  padding: 5rem 4rem; /* Decreased padding */
  margin: 0 auto;
  width: 96vw;
  max-width: 1800px;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.footer-logo svg {
  width: 65px; /* Increased as requested */
  height: 65px;
}

.footer-brand-name {
  font-size: 1.85rem; /* Increased as requested */
  font-weight: 700;
  letter-spacing: -0.04em;
}

.footer-statement {
  font-size: clamp(2rem, 4vw, 3.5rem); 
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: inherit;
  margin: 1rem 0 2.5rem;
}

/* Enhanced Back to Top Button */
.back-to-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  background: transparent;
}

.btn-icon-circle {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.back-to-top-btn:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.back-to-top-btn:hover .btn-icon-circle {
  background-color: #fff;
  color: var(--color-text-main);
  transform: scale(1.1) rotate(-10deg);
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  justify-content: flex-start;
  align-items: flex-end;
  text-align: right;
}

.footer-info-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  opacity: 0.5;
  font-weight: 700;
}

.info-link {
  font-size: 1.35rem; 
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease-out; 
  display: inline-block;
}

/* Premium Underline Animation (Unified) */
.underline-premium {
  position: relative;
  transition: opacity 0.2s ease-out;
}

.underline-premium::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  transform: translateX(-50%);
}

.underline-premium:hover::after,
.underline-premium.active::after {
  width: 100%;
}

.footer-nav a.underline-premium::after {
  bottom: 0; /* Align closer to text for nav */
}

.info-link:hover {
  opacity: 1;
}

.social-links-premium {
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease-out; /* Ultra-fast */
  opacity: 0.6;
}

.social-btn svg, .social-text {
  transition: transform 0.2s ease-out; /* Ultra-fast */
  display: inline-block;
}

.social-btn:hover {
  opacity: 1;
  transform: translateY(-5px);
}

.social-btn:hover svg {
  transform: rotate(12deg) scale(1.15);
}

.footer-bottom {
  padding-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.footer-copyright {
  opacity: 0.5;
}

.footer-nav {
  display: flex;
  gap: 3.5rem;
}

.footer-nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.5;
  transition: all 0.2s ease-out; /* Ultra-fast */
  position: relative;
  padding-bottom: 8px;
}

.footer-nav a:hover,
.footer-nav a.active {
  opacity: 1;
}

/* Active Dot Indicator */
.footer-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 1024px) {
  .footer-card {
    padding: 3.5rem 2.5rem;
    border-radius: 30px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  
  .footer-links-col {
    align-items: flex-start;
    text-align: left;
  }
  
  .social-links-minimal {
    justify-content: flex-start;
  }
  
  .footer-bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .footer-nav {
    flex-wrap: wrap;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  /* 1. Remove the <br> line-break in the footer statement on mobile */
  .footer-statement br {
    display: none;
  }

  .footer-statement {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  /* 2. Align Voltar ao Topo to the right */
  .footer-info-group:has(.back-to-top-btn) {
    align-items: flex-end;
    text-align: right;
    width: 100%;
  }

  /* 3. Footer nav: inverted pyramid — flex-wrap + center */
  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2.5rem;
    width: 100%;
  }

  /* Center the entire nav block */
  .footer-bottom {
    align-items: center;
  }

  .footer-copyright {
    text-align: center;
  }
}
