/**
 * TINGLE DIGITAL - Components Library
 * Componentes UI reutilizáveis
 * Light Theme - Nova Paleta 2025
 *
 * @version 2.0.0
 */

/* ============================================
 * RESET BASE
 * ============================================ */

.tingle-component,
.tingle-component *,
.tingle-component *::before,
.tingle-component *::after {
  box-sizing: border-box;
}

/* ============================================
 * BUTTONS
 * ============================================ */

/* Base Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-all);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 112, 76, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 18px var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
  line-height: 1.2;
}

/* Ensure text and icon are centered */
.btn span {
  display: inline-flex;
  align-items: center;
}

.btn svg.btn-icon {
  flex-shrink: 0;
}

.btn-xl {
  padding: var(--space-6) var(--space-12);
  font-size: var(--text-xl);
  border-radius: var(--radius-2xl);
}

/* Primary Button */
.btn-primary {
  background: var(--gradient-coral-amber);
  background-size: 200% 200%;
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-coral);
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px rgba(255, 112, 76, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Button (Outline) */
.btn-secondary {
  background: transparent;
  color: var(--tingle-coral);
  border-color: var(--tingle-coral);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-coral-amber);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-normal) var(--ease-snap);
  z-index: -1;
}

.btn-secondary:hover {
  color: white;
  border-color: transparent;
}

.btn-secondary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  color: var(--tingle-brown);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(50, 30, 12, 0.05);
}

/* Glass Button */
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  color: var(--tingle-brown);
  border-color: var(--glass-border);
}

.btn-glass:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(50, 30, 12, 0.15);
}

/* 3D Button */
.btn-3d {
  background: var(--tingle-coral);
  color: white;
  border: none;
  box-shadow:
    0 6px 0 var(--tingle-coral-dark),
    0 10px 20px rgba(255, 112, 76, 0.3);
  transform: translateY(0);
}

.btn-3d:hover {
  transform: translateY(-3px);
  box-shadow:
    0 9px 0 var(--tingle-coral-dark),
    0 15px 25px rgba(255, 112, 76, 0.4);
}

.btn-3d:active {
  transform: translateY(3px);
  box-shadow:
    0 3px 0 var(--tingle-coral-dark),
    0 5px 15px rgba(255, 112, 76, 0.2);
}

/* Button with Icon */
.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-full);
}

.btn .icon {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover .icon-arrow {
  transform: translateX(4px);
}

/* Button Ripple Container */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

/* Magnetic Button (requires JS) */
.magnetic-btn {
  transition: transform 0.1s ease-out;
}

/* ============================================
 * CARDS - LIGHT THEME
 * ============================================ */

/* Base Card */
.card {
  position: relative;
  padding: var(--space-8);
  background: white;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: var(--transition-all);
  box-shadow: var(--shadow-md);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Glass Card */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.card-glass:hover {
  background: var(--glass-bg-strong);
  border-color: rgba(50, 30, 12, 0.12);
}

/* Gradient Card */
.card-gradient {
  background: linear-gradient(
    135deg,
    white 0%,
    var(--light-secondary) 100%
  );
}

/* Card with Glow */
.card-glow {
  position: relative;
}

.card-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-coral-amber);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card-glow:hover::before {
  opacity: 1;
}

/* 3D Tilt Card (requires JS) */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.tilt-card .card-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.tilt-card .card-content {
  position: relative;
  z-index: 1;
  transform: translateZ(30px);
}

/* Service Card */
.card-service {
  text-align: center;
  padding: var(--space-10);
  background: white;
  border: 1px solid rgba(50, 30, 12, 0.08);
}

.card-service:hover {
  border-color: var(--tingle-coral);
}

.card-service .card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
}

.card-service .card-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--tingle-brown);
  margin-bottom: var(--space-4);
}

.card-service .card-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Software/Product Card */
.card-software {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  padding: var(--space-12);
  align-items: center;
  background: white;
  border: 1px solid rgba(50, 30, 12, 0.08);
}

.card-software:nth-child(even) {
  direction: rtl;
}

.card-software:nth-child(even) > * {
  direction: ltr;
}

.card-software .product-icon {
  width: 100px;
  height: 100px;
  margin-bottom: var(--space-6);
}

.card-software .product-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--tingle-turquoise);
  background: rgba(2, 176, 181, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.card-software .product-name {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--tingle-brown);
  margin-bottom: var(--space-4);
}

.card-software .product-description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.card-software .product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8);
}

.card-software .product-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.card-software .product-features .check-icon {
  width: 20px;
  height: 20px;
  color: var(--tingle-turquoise);
}

.card-software .product-preview {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.card-software .product-preview img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card-software:hover .product-preview img {
  transform: scale(1.05);
}

/* ============================================
 * INPUTS & FORMS - LIGHT THEME
 * ============================================ */

/* Input Group */
.input-group {
  position: relative;
  margin-bottom: var(--space-6);
}

/* Base Input */
.input {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--tingle-brown);
  background: white;
  border: 1px solid rgba(50, 30, 12, 0.15);
  border-radius: var(--radius-lg);
  outline: none;
  transition: var(--transition-all);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input:focus {
  background: white;
  border-color: var(--tingle-coral);
  box-shadow: 0 0 0 3px rgba(255, 112, 76, 0.15);
}

/* Floating Label Input */
.input-floating {
  padding-top: var(--space-6);
}

.input-floating + .input-label {
  position: absolute;
  top: 50%;
  left: var(--space-5);
  transform: translateY(-50%);
  font-size: var(--text-base);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: var(--transition-all);
}

.input-floating:focus + .input-label,
.input-floating:not(:placeholder-shown) + .input-label {
  top: var(--space-2);
  transform: translateY(0);
  font-size: var(--text-xs);
  color: var(--tingle-coral);
}

/* Animated Underline Input */
.input-underline {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(50, 30, 12, 0.15);
  border-radius: 0;
  padding: var(--space-4) 0;
}

.input-underline:focus {
  box-shadow: none;
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-coral-amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-normal) var(--ease-snap);
}

.input-underline:focus ~ .input-line {
  transform: scaleX(1);
}

/* Textarea */
.textarea {
  min-height: 150px;
  resize: vertical;
}

/* Input States */
.input-group.success .input {
  border-color: var(--tingle-green);
}

.input-group.error .input {
  border-color: var(--tingle-magenta);
}

.input-message {
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: var(--text-xs);
  opacity: 0;
  transform: translateY(-5px);
  transition: var(--transition-all);
}

.input-group.error .input-message,
.input-group.success .input-message {
  opacity: 1;
  transform: translateY(0);
}

.input-group.error .input-message {
  color: var(--tingle-magenta);
}

.input-group.success .input-message {
  color: var(--tingle-green);
}

/* ============================================
 * TAGS & BADGES - NEW PALETTE
 * ============================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-full);
}

.tag-coral {
  color: var(--tingle-coral);
  background: rgba(255, 112, 76, 0.12);
}

.tag-magenta {
  color: var(--tingle-magenta);
  background: rgba(229, 59, 88, 0.12);
}

.tag-amber {
  color: var(--tingle-amber);
  background: rgba(253, 176, 19, 0.12);
}

.tag-green {
  color: var(--tingle-green);
  background: rgba(141, 170, 57, 0.12);
}

.tag-turquoise {
  color: var(--tingle-turquoise);
  background: rgba(2, 176, 181, 0.12);
}

/* Legacy tag names */
.tag-purple {
  color: var(--tingle-magenta);
  background: rgba(229, 59, 88, 0.12);
}

.tag-cyan {
  color: var(--tingle-turquoise);
  background: rgba(2, 176, 181, 0.12);
}

.tag-gold {
  color: var(--tingle-amber);
  background: rgba(253, 176, 19, 0.12);
}

/* ============================================
 * DECORATIVE ELEMENTS - NEW PALETTE
 * ============================================ */

/* Gradient Orb */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.3;
  pointer-events: none;
}

.gradient-orb-coral {
  background: var(--tingle-coral);
}

.gradient-orb-magenta {
  background: var(--tingle-magenta);
}

.gradient-orb-amber {
  background: var(--tingle-amber);
}

.gradient-orb-green {
  background: var(--tingle-green);
}

.gradient-orb-turquoise {
  background: var(--tingle-turquoise);
}

/* Legacy orb names */
.gradient-orb-purple {
  background: var(--tingle-magenta);
}

.gradient-orb-cyan {
  background: var(--tingle-turquoise);
}

/* Blob Shape */
.blob-shape {
  position: absolute;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  opacity: 0.3;
  pointer-events: none;
}

/* Floating Element Container */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-element {
  position: absolute;
}

/* Glow Effect */
.glow {
  position: relative;
}

.glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 30px;
  background: var(--tingle-coral);
  filter: blur(20px);
  opacity: 0.3;
  z-index: -1;
}

/* ============================================
 * SECTION DIVIDERS
 * ============================================ */

.section-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.section-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
}

.section-divider-wave svg {
  height: 100px;
}

.section-divider-curve svg {
  height: 60px;
}

/* ============================================
 * SCROLL INDICATOR
 * ============================================ */

.scroll-indicator-wrapper {
  position: absolute;
  bottom: var(--space-10);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.scroll-indicator-mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-secondary);
  border-radius: 20px;
  position: relative;
  margin: 0 auto var(--space-2);
}

.scroll-indicator-mouse::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--tingle-coral);
  border-radius: 2px;
  animation: scroll-indicator 2s ease-in-out infinite;
}

.scroll-indicator-text {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

/* ============================================
 * COUNTER
 * ============================================ */

.counter {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  color: var(--tingle-brown);
  line-height: 1;
}

.counter-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-top: var(--space-2);
}

/* ============================================
 * RESPONSIVE
 * ============================================ */

@media (max-width: 768px) {
  .card-software {
    grid-template-columns: 1fr;
    padding: var(--space-8);
  }

  .card-software:nth-child(even) {
    direction: ltr;
  }

  .card-software .product-preview {
    order: -1;
    margin-bottom: var(--space-6);
  }
}

/* Hero Secondary CTAs */
.hero-ctas-secondary {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	justify-content: center;
	margin-top: var(--space-4);
}

.btn-outline {
	background: transparent;
	border: 2px solid var(--tingle-coral);
	color: var(--tingle-brown);
	transition: all 0.3s ease;
}

.btn-outline:hover {
	background: var(--tingle-coral);
	color: white;
	transform: translateY(-2px);
}

@media (max-width: 768px) {
	.hero-ctas-secondary {
		flex-direction: column;
		align-items: center;
	}
	
	.hero-ctas-secondary .btn {
		width: 100%;
		max-width: 280px;
	}
}

/* Hero Secondary CTAs - Mobile Only */
.hero-ctas-secondary {
	display: none;
}

@media (max-width: 1024px) {
	.hero-ctas-secondary {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-3);
		justify-content: center;
		margin-top: var(--space-4);
	}
}

/* ============================================
   COOKIE CONSENT BANNER - LGPD
   ============================================ */

.cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--light-primary, #FFFFFF);
	box-shadow: 0 -4px 20px rgba(50, 30, 12, 0.15);
	z-index: 99999;
	padding: var(--space-4, 16px) var(--space-6, 24px);
	transform: translateY(100%);
	transition: transform 0.4s ease;
	border-top: 3px solid var(--tingle-coral, #FF704C);
}

.cookie-consent.active {
	transform: translateY(0);
}

.cookie-consent.hidden {
	display: none;
}

.cookie-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6, 24px);
	flex-wrap: wrap;
}

.cookie-text {
	flex: 1;
	min-width: 280px;
}

.cookie-text h4 {
	font-family: var(--font-heading, 'Space Grotesk', sans-serif);
	font-size: var(--text-lg, 1.125rem);
	font-weight: 600;
	color: var(--tingle-brown, #321E0C);
	margin: 0 0 var(--space-2, 8px) 0;
}

.cookie-text p {
	font-size: var(--text-sm, 0.875rem);
	color: var(--text-secondary, rgba(50, 30, 12, 0.7));
	margin: 0;
	line-height: 1.5;
}

.cookie-text a {
	color: var(--tingle-coral, #FF704C);
	text-decoration: underline;
	font-weight: 500;
}

.cookie-text a:hover {
	color: var(--tingle-magenta, #E53B58);
}

.cookie-actions {
	display: flex;
	gap: var(--space-3, 12px);
	flex-shrink: 0;
}

.cookie-actions .btn-ghost {
	background: transparent;
	border: 1px solid var(--text-tertiary, rgba(50, 30, 12, 0.5));
	color: var(--text-secondary, rgba(50, 30, 12, 0.7));
}

.cookie-actions .btn-ghost:hover {
	background: var(--light-secondary, #F8F9FA);
}

@media (max-width: 768px) {
	.cookie-consent {
		padding: var(--space-4, 16px);
	}
	
	.cookie-content {
		flex-direction: column;
		text-align: center;
	}
	
	.cookie-actions {
		width: 100%;
		justify-content: center;
	}
	
	.cookie-actions .btn {
		flex: 1;
		max-width: 150px;
	}
}

/* ============================================
   PRIVACY POLICY PAGE
   ============================================ */

.privacy-section {
	padding: var(--space-16, 64px) 0;
}

.privacy-content {
	max-width: 800px;
	margin: 0 auto;
	padding: var(--space-10, 40px);
	background: var(--light-primary, #FFFFFF);
	border-radius: var(--radius-2xl, 24px);
}

.privacy-block {
	margin-bottom: var(--space-8, 32px);
	padding-bottom: var(--space-8, 32px);
	border-bottom: 1px solid var(--light-border, rgba(50, 30, 12, 0.1));
}

.privacy-block:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.privacy-block h2 {
	font-family: var(--font-heading, 'Space Grotesk', sans-serif);
	font-size: var(--text-xl, 1.25rem);
	font-weight: 600;
	color: var(--tingle-brown, #321E0C);
	margin: 0 0 var(--space-4, 16px) 0;
}

.privacy-block p {
	font-size: var(--text-base, 1rem);
	color: var(--text-secondary, rgba(50, 30, 12, 0.7));
	line-height: 1.7;
	margin: 0 0 var(--space-4, 16px) 0;
}

.privacy-block ul {
	margin: 0 0 var(--space-4, 16px) 0;
	padding-left: var(--space-6, 24px);
}

.privacy-block li {
	font-size: var(--text-base, 1rem);
	color: var(--text-secondary, rgba(50, 30, 12, 0.7));
	line-height: 1.7;
	margin-bottom: var(--space-2, 8px);
}

.privacy-block a {
	color: var(--tingle-coral, #FF704C);
	text-decoration: underline;
}

.privacy-block a:hover {
	color: var(--tingle-magenta, #E53B58);
}

.privacy-block .contact-info {
	list-style: none;
	padding-left: 0;
}

.privacy-block .contact-info li {
	padding: var(--space-2, 8px) 0;
}

@media (max-width: 768px) {
	.privacy-content {
		padding: var(--space-6, 24px);
	}
}
