/* ==========================================
   PRICING PAGE - Caramelo_HUB
   ========================================== */

/* CSS Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Cores principais - Tema Teal (Caramelo_HUB) */
  --primary: #8AC1C3;
  --primary-hover: #6fa9ab;
  --primary-light: #d4e8e9;
  --primary-dark: #294344;

  --secondary: #294344;
  --secondary-dark: #1a2a2b;
  --secondary-light: #3a5455;

  /* Backgrounds */
  --bg: rgb(250, 250, 255);
  --bg-secondary: rgb(245, 245, 255);
  --bg-tertiary: rgb(240, 240, 255);
  --bg-contrast: rgb(15, 23, 42);

  /* Neutros */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Bordas */
  --border: rgb(89, 124, 126);
  --border-dark: #445b5c;

  --white: #FFFFFF;
  --black: #000000;

  /* Semântico */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Tipografia */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Inter', var(--font-body);

  /* Espaçamentos */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Raios de borda */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transições */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 200ms ease-in-out;
}

/* ==========================================
   HERO / HEADER
   ========================================== */

.pricing-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: var(--space-xl) var(--space-lg) var(--space-xl);
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: visible;
}

.pricing-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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.4;
}

/* ==========================================
   LOGOUT BUTTON (HEADER)
   ========================================== */

.userbox {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.userbox #logout {
  padding: 0.5rem var(--space-md);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition-base);
}

.userbox #logout:hover {
  background-color: var(--white);
  color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.userbox #logout:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 0 auto var(--space-md);
  width: 100%;
  position: relative;
  z-index: 10;
}

.breadcrumb ol {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  font-size: 0.875rem;
  padding: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: var(--gray-300);
  font-size: 1.25rem;
}

.breadcrumb a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.breadcrumb a:hover {
  opacity: 1;
  text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
  opacity: 1;
  font-weight: 500;
}

/* Hero Content */
.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.hero-content .subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  line-height: 1.5;
  opacity: 0.95;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Pricing Toggle */
.pricing-toggle {
  display: inline-flex;
  background-color: var(--gray-100);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: var(--space-xs);
  margin-bottom: var(--space-2xl);
  gap: var(--space-xs);
  width: fit-content;
}

.toggle-btn {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  color: var(--gray-700);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.toggle-btn:hover {
  background-color: var(--gray-200);
  color: var(--gray-900);
}

.toggle-btn.is-active {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.save-badge {
  display: inline-block;
  background-color: var(--success);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem var(--space-sm);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* CTA Row */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.875rem var(--space-xl);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn.primary {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn.primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn.secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn.secondary:hover {
  background-color: var(--white);
  color: var(--primary-dark);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-lg);
  list-style: none;
  margin-bottom: var(--space-lg);
}

.trust-badges li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  opacity: 0.9;
}

.trust-badges svg {
  fill: currentColor;
  flex-shrink: 0;
}

/* Microcopy */
.microcopy {
  font-size: 0.8125rem;
  opacity: 0.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================
   PRICING OFFERS SECTION
   ========================================== */

.pricing-offers {
  padding: var(--space-3xl) var(--space-lg);
  background-color: var(--bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-offers h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--gray-900);
}

/* Centralizar o toggle abaixo do título */
.pricing-offers .pricing-toggle {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-2xl);
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

/* Plan Card */
.plan-card {
  background-color: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.plan-card.is-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.plan-card.is-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Plan Header */
.plan-header {
  margin-bottom: var(--space-lg);
  position: relative;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-sm);
}

.plan-tagline {
  font-size: 0.9375rem;
  color: var(--gray-600);
  margin-bottom: var(--space-sm);
}

.featured-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem var(--space-md);
  border-radius: var(--radius-full);
  margin-top: var(--space-sm);
}

/* Plan Price */
.plan-price {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
}

.plan-price .amount {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.plan-price .cycle {
  font-size: 1rem;
  color: var(--gray-600);
  font-weight: 500;
}

.plan-price .save {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 600;
}

.plan-price .save[hidden] {
  display: none;
}

/* Plan Features */
.plan-features,
.plan-limitations {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.plan-features li,
.plan-limitations li {
  font-size: 0.9375rem;
  padding: var(--space-sm) 0;
  padding-left: var(--space-xl);
  position: relative;
  color: var(--gray-700);
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: var(--space-sm);
  width: 20px;
  height: 20px;
  background-color: var(--success);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.plan-limitations li::before {
  content: '−';
  position: absolute;
  left: 0;
  top: var(--space-sm);
  width: 20px;
  height: 20px;
  background-color: var(--gray-300);
  color: var(--gray-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}

/* Plan CTA */
.plan-cta {
  margin-top: auto;
}

.plan-cta .btn {
  width: 100%;
  justify-content: center;
}

.plan-card:not(.is-featured) .plan-cta .btn.primary {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.plan-card:not(.is-featured) .plan-cta .btn.primary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
}

.plan-cta .microcopy {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: var(--gray-600);
}

/* ==========================================
   UTILITIES & ACCESSIBILITY
   ========================================== */

[role="alert"].pricing-alert {
  background-color: var(--warning, #F59E0B);
  color: var(--secondary-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) auto;
  max-width: 960px;
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
  animation: fadeInDown var(--transition-slow);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[hidden] {
  display: none !important;
}

/* Focus styles para acessibilidade */
.btn:focus-visible,
.toggle-btn:focus-visible,
.breadcrumb a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}