/* Custom CSS to enhance Tailwind */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --dark-bg: #0f0f0f;
  --dark-bg-2: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Navbar styling */
.nav-link {
  position: relative;
  color: var(--text-primary);
  opacity: 0.7;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#navbar {
  transition: background 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(15, 15, 15, 0.9);
  backdrop-filter: blur(10px);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Dropdown styling */

.dropdown-menu {
  border-radius: 4px;
  transition: all 0.2s ease-out;
}

.website-list {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

#websiteList li,
#mobileWebsiteList li {
  padding: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: 4px;
  margin: 2px 0;
}

#websiteList li:hover,
#mobileWebsiteList li:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Fix hidden state */
.hidden {
  display: none !important;
}

/* Alpine.js transitions */
[x-cloak] { 
  display: none !important; 
}

[x-transition\:enter] {
  opacity: 0;
  transform: scale(0.95);
}

[x-transition\:enter-start] {
  opacity: 0;
  transform: scale(0.95);
}

[x-transition\:enter-end] {
  opacity: 1;
  transform: scale(1);
}

[x-transition\:leave] {
  opacity: 1;
  transform: scale(1);
}

[x-transition\:leave-start] {
  opacity: 1;
  transform: scale(1);
}

[x-transition\:leave-end] {
  opacity: 0;
  transform: scale(0.95);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 0;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

/* Hero Section Reset */
.hero-title,
.hero-text,
.hero .btn-primary,
.hero .btn-secondary {
  position: relative;
  z-index: 30;
}

.hero .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  z-index: 30;
  position: relative;
}

.hero {
  min-height: 100vh;
  position: relative;
  background-color: var(--dark-bg);
}

/* Grid overlay */
.grid-overlay {
  pointer-events: none;
  /* This would be your grid pattern background if needed */
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  font-size: 14px;
  opacity: 0.7;
}

.scroll-indicator i {
  margin-top: 10px;
  font-size: 18px;
}

/* Sections styling */
.section-header {
  position: relative;
  max-width: 800px;
  margin: 0 auto 4rem;
  text-align: center;
}

.section-number {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 1.5rem auto 0;
}

/* Services cards */
.service-card {
  background-color: var(--dark-bg-2);
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

.service-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.service-card ul li {
  position: relative;
  padding-left: 1.5rem;
}

.service-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 0.875rem;
}

/* Portfolio grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px));
  gap: 1.5rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  height: 400px;
}

.portfolio-item:nth-child(3n+2) {
  margin-top: 3rem;
}

.portfolio-image {
  width: 100%;
  height: 100%;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-overlay h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.portfolio-overlay p {
  color: var(--primary-light);
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Contact section */
.contact-item {
  display: flex;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-family: inherit;
  transition: background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  background-color: rgba(255, 255, 255, 0.15);
  outline: none;
}

/* Footer */
.footer-col {
  margin-bottom: 2rem;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .service-cards {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item {
    height: 300px;
  }

  .portfolio-item:nth-child(3n+2) {
    margin-top: 0;
  }
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeUp {
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.animate {
  opacity: 0;
  animation-duration: 0.8s;
  animation-fill-mode: forwards;
  animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animate.fade-in { animation-name: fadeIn; }
.animate.fade-in-up { animation-name: fadeInUp; }
.animate.fade-in-left { animation-name: fadeInLeft; }
.animate.fade-in-right { animation-name: fadeInRight; }
.animate.scale-in { animation-name: scaleIn; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

.section-header .section-number,
.section-header .section-title,
.section-header .section-desc {
  opacity: 1;
}

.service-card {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.portfolio-item {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.form-group {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

footer .team-member {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}