/**
 * ============================================================================
 * Country ISO API - Website Components
 * ============================================================================
 * Reusable UI components for marketing website
 * ============================================================================
 */

/* ============================================================================
 * BUTTONS
 * ============================================================================ */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.5;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
  z-index: 0;
  pointer-events: none;
}

.btn:hover::before {
  left: 100%;
}

/* Ensure button text is always visible above effects */
.btn-primary,
.btn-secondary {
  position: relative;
}

.btn-primary *,
.btn-secondary * {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5), 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 45px rgba(37, 99, 235, 0.6), 0 8px 25px rgba(37, 99, 235, 0.4), 0 0 30px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: var(--font-size-lg);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================================================
 * NAVIGATION
 * ============================================================================ */

.navbar {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--max-width-xl);
  margin: 0 auto;
}

.navbar-logo {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  text-decoration: none;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.navbar-link {
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  padding: var(--space-sm) var(--space-md);
  transition: color var(--transition-base);
}

.navbar-link:hover {
  color: var(--primary-color);
}

.navbar-link.active {
  color: var(--primary-color);
}

/* Mobile menu toggle */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  cursor: pointer;
}

/* Mobile styles */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    flex-direction: column;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .navbar-menu.open {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }
}

/* ============================================================================
 * HERO SECTION
 * ============================================================================ */

.hero {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #8b5cf6 100%);
  color: var(--text-inverse);
  padding: var(--space-4xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(139, 92, 246, 0.3), transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(59, 130, 246, 0.3), transparent 50%);
}

.hero-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  color: var(--text-inverse);
  position: relative;
  z-index: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2xl);
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta .btn-primary {
  background-color: var(--text-inverse);
  color: var(--primary-color);
  border-color: var(--text-inverse);
}

.hero-cta .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.hero-cta .btn-secondary {
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-cta .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-inverse);
}

@media (min-width: 768px) {
  .hero {
    padding: var(--space-4xl) var(--space-lg);
  }

  .hero-title {
    font-size: var(--font-size-5xl);
  }
}

/* ============================================================================
 * SECTIONS
 * ============================================================================ */

.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-title {
  text-align: center;
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

.section-alt {
  background-color: var(--bg-secondary);
}

/* ============================================================================
 * FEATURE GRID
 * ============================================================================ */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: var(--max-width-xl);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: var(--space-2xl);
  background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(37, 99, 235, 0.08);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-12px) rotateX(2deg);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.2), 0 10px 30px rgba(37, 99, 235, 0.12), 0 0 40px rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.25);
}

.feature-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-md);
  color: var(--primary-color);
}

.feature-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.feature-description {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* ============================================================================
 * PRICING CARDS
 * ============================================================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: var(--max-width-2xl);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.9) 100%);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(37, 99, 235, 0.1);
  border-radius: 24px;
  padding: var(--space-3xl);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.pricing-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card:hover::after {
  opacity: 1;
}

.pricing-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 30px 70px rgba(37, 99, 235, 0.25), 0 15px 35px rgba(37, 99, 235, 0.15), 0 0 50px rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.pricing-card.featured {
  background: linear-gradient(145deg, rgba(240,247,255,1) 0%, rgba(230,242,255,0.98) 100%);
  border: 3px solid #3b82f6;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3), 0 4px 12px rgba(37, 99, 235, 0.2), 0 0 30px rgba(37, 99, 235, 0.15);
  transform: scale(1.05);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.pricing-card.featured:hover {
  transform: translateY(-6px) scale(1.07);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.4), 0 10px 22px rgba(37, 99, 235, 0.3), 0 0 50px rgba(37, 99, 235, 0.2);
}

.pricing-badge {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: var(--text-inverse);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  position: relative;
  z-index: 1;
}

.pricing-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.pricing-price {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
}

.pricing-period {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.pricing-features {
  list-style: none;
  margin-bottom: var(--space-xl);
  text-align: left;
  position: relative;
  z-index: 1;
}

.pricing-features li {
  padding: var(--space-sm) 0;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.pricing-features li::before {
  content: "✓ ";
  color: var(--accent-color);
  font-weight: var(--font-weight-bold);
  margin-right: var(--space-sm);
}

/* ============================================================================
 * CODE BLOCK
 * ============================================================================ */

.code-block {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

.code-block pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
}

/* ============================================================================
 * FOOTER
 * ============================================================================ */

.footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width-xl);
  margin: 0 auto var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section-title {
  color: var(--text-inverse);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: var(--text-inverse);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
}

/* ============================================================================
 * STATS SECTION
 * ============================================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: var(--max-width-xl);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  text-align: center;
  padding: var(--space-lg);
}

.stat-value {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  margin-bottom: var(--space-xs);
}

.stat-label {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

/* ============================================================================
 * CTA SECTION
 * ============================================================================ */

.cta-section {
  background: var(--bg-gradient);
  color: var(--text-inverse);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  border-radius: var(--radius-2xl);
  margin: var(--space-2xl) 0;
}

.cta-section h2 {
  color: var(--text-inverse);
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-xl);
  color: rgba(255, 255, 255, 0.9);
}
