/* Component-Specific Styles */

/* Navigation Component */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: hsl(var(--background) / 0.95);
  border-bottom: 1px solid hsl(var(--border) / 0.3);
  overflow: hidden;
  will-change: transform;
  transform: translateZ(0);
}

.nav-bg {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-size: cover;
  background-position: center;
}

.nav-container {
  position: relative;
  z-index: 10;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 2rem;
  height: 2rem;
  background: var(--gradient-hero);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px 0 hsl(var(--primary) / 0.25);
}

.nav-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--ink));
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-logo-text:hover {
  color: hsl(var(--primary));
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
}

.nav-item:hover {
  color: hsl(var(--ink));
  background-color: hsl(var(--muted) / 0.5);
}

.nav-item.active {
  background: var(--gradient-code);
  color: hsl(var(--primary));
}

.nav-item-icon {
  width: 1rem;
  height: 1rem;
  transition: all 0.3s ease;
  color: hsl(var(--muted-foreground));
}

.nav-item:hover .nav-item-icon {
  color: hsl(var(--primary));
  transform: scale(1.1);
}

.nav-item.active .nav-item-icon {
  color: hsl(var(--primary));
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .nav-actions {
    display: flex;
  }
}

.nav-mobile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav-mobile {
    display: none;
  }
}

.nav-mobile-menu {
  border-top: 1px solid hsl(var(--border) / 0.5);
  background-color: hsl(var(--background) / 0.98);
  box-shadow: var(--shadow-card);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
  will-change: transform, opacity;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 0.5rem;
  color: hsl(var(--muted-foreground));
}

.nav-mobile-item:hover {
  color: hsl(var(--ink));
  background: var(--gradient-code);
}

.nav-mobile-item.active {
  background: var(--gradient-code);
  color: hsl(var(--primary));
}

.nav-mobile-item-icon {
  width: 1rem;
  height: 1rem;
  transition: color 0.3s ease;
  color: hsl(var(--muted-foreground));
}

.nav-mobile-item:hover .nav-mobile-item-icon {
  color: hsl(var(--primary));
}

.nav-mobile-item.active .nav-mobile-item-icon {
  color: hsl(var(--primary));
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: scale(1.05);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover {
  background-color: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  transform: scale(1.05);
}

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

.btn-outline:hover {
  background-color: hsl(var(--muted) / 0.5);
  border-color: hsl(var(--border));
}

/* Hero Section Component */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsl(222 47% 11% / 0.9), hsl(222 47% 11% / 0.8), hsl(222 47% 11% / 0.7));
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: 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='%23000' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: hsl(var(--accent) / 0.1);
  backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--accent) / 0.2);
  margin-bottom: 1.5rem;
}

.hero-badge-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--accent));
}

/* Code icon for hero badge */
.hero-badge-icon {
  stroke-width: 2;
  font-size: 0.875rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.hero-title-line-1 {
  color: white;
}

.hero-title-line-2 {
  background: linear-gradient(to right, hsl(var(--accent)), hsl(var(--primary)), hsl(var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse 2s ease-in-out infinite;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 6rem;
  }
}

.hero-description {
  font-size: 1.25rem;
  color: rgb(255 255 255 / 0.9);
  margin-bottom: 3rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.625;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.5rem;
  }
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

.hero-floating-element {
  position: absolute;
  border-radius: 9999px;
  filter: blur(40px);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero-floating-1 {
  top: 5rem;
  left: 2.5rem;
  width: 8rem;
  height: 8rem;
  background-color: hsl(var(--accent) / 0.2);
}

.hero-floating-2 {
  top: 10rem;
  right: 5rem;
  width: 6rem;
  height: 6rem;
  background-color: hsl(var(--primary) / 0.2);
  animation-delay: 1s;
}

.hero-floating-3 {
  bottom: 5rem;
  right: 2.5rem;
  width: 10rem;
  height: 10rem;
  background-color: rgb(255 255 255 / 0.1);
  animation-delay: 2s;
}

.hero-floating-4 {
  bottom: 10rem;
  left: 5rem;
  width: 7rem;
  height: 7rem;
  background-color: hsl(var(--accent) / 0.1);
  animation-delay: 1.5s;
}

/* Card Component */
.card {
  background-color: hsl(var(--card));
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-glow);
}

.card-content {
  padding: 2rem;
}

.card-icon-wrapper {
  width: 4rem;
  height: 4rem;
  background: var(--gradient-hero);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.card-icon {
  width: 2rem;
  height: 2rem;
  color: white;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--ink));
  margin-bottom: 0.75rem;
  text-align: center;
}

.card-description {
  color: hsl(var(--muted-foreground));
  line-height: 1.625;
  text-align: center;
}

/* Footer Component */
.footer {
  background-color: hsl(222 47% 11%);
  color: white;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@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-brand {
  margin-bottom: 1rem;
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: rgb(255 255 255 / 0.7);
  font-size: 0.875rem;
}

.footer-contact {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.footer-contact-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: hsl(var(--accent));
}

.footer-contact-text {
  color: rgb(255 255 255 / 0.7);
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social-link {
  width: 2rem;
  height: 2rem;
  background-color: rgb(255 255 255 / 0.1);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  text-decoration: none;
}

.footer-social-link:hover {
  background-color: hsl(var(--accent));
}

.footer-social-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: white;
}

.footer-section h4 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.footer-links {
  list-style: none;
  space-y: 0.5rem;
}

.footer-link {
  display: block;
  color: rgb(255 255 255 / 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: hsl(var(--accent));
}

.footer-newsletter {
  display: flex;
  gap: 0.5rem;
}

.footer-input {
  flex: 1;
  background-color: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.2);
  color: white;
  padding: 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
}

.footer-input::placeholder {
  color: rgb(255 255 255 / 0.5);
}

.footer-divider {
  height: 1px;
  background-color: rgb(255 255 255 / 0.2);
  margin: 1.5rem 0;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

.footer-copyright {
  color: rgb(255 255 255 / 0.7);
  font-size: 0.75rem;
}

.footer-built {
  color: rgb(255 255 255 / 0.7);
  font-size: 0.75rem;
}

/* Input Component */
.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid hsl(var(--input));
  border-radius: 0.375rem;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px hsl(var(--ring));
  border-color: hsl(var(--ring));
}

.input::placeholder {
  color: hsl(var(--muted-foreground));
}

/* Separator Component */
.separator {
  height: 1px;
  background-color: hsl(var(--border));
}

/* Theme Toggle Component */
.theme-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background-color: hsl(var(--muted));
}

.theme-toggle-icon {
  width: 1rem;
  height: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: none;
  background-color: transparent;
  color: hsl(var(--foreground));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background-color: hsl(var(--muted));
  transform: scale(1.1);
}

.mobile-menu-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Icon Styles */
.icon {
  width: 1rem;
  height: 1rem;
}

.icon-sm {
  width: 0.75rem;
  height: 0.75rem;
}

.icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-xl {
  width: 1.5rem;
  height: 1.5rem;
}

/* Button Container Centering */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-col-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .flex-row-center {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
}

/* Responsive Navigation */
@media (max-width: 767px) {
  .nav-mobile-menu {
    display: none;
  }
  
  .nav-mobile-menu.open {
    display: block;
  }
}

/* Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-down {
  animation: slideDown 0.3s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
