/* Custom styles for Webtron Landing Page */

/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Add padding to account for sticky header */
}

body {
  overflow-x: hidden;
}

/* Section animations */
section {
  animation: fadeIn 0.8s ease-out;
  padding-top: 2rem;
}

section h2 {
  padding-top: 1rem;
  margin-top: 0.5rem;
}

/* Hero section enhancements */
.hero-gradient {
  background-image: linear-gradient(135deg, #1E3A8A 0%, #312E81 50%, #4338CA 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Card hover effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Button glow effect */
.cta-button {
  position: relative;
  overflow: hidden;
}

.cta-button:after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(30deg);
  transition: transform 0.5s;
}

.cta-button:hover:after {
  transform: rotate(30deg) translate(10%, 10%);
}

/* AI section enhancement */
.ai-feature-icon {
  animation: float 3s ease-in-out infinite;
}

/* Tech stack icon styling */
.tech-icon {
  transition: all 0.3s ease;
}

.tech-icon:hover {
  transform: scale(1.1);
  color: #3B82F6;
}

/* Form field focus effects */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  outline: none;
}

/* Accessibility improvements */
a:focus, button:focus {
  outline: none;
  outline-offset: 2px;
}

/* Prevent FOUC (Flash of Unstyled Content) */
.hidden {
  display: none !important;
}

/* Add smooth transitions for all interactive elements */
a, button, input, textarea {
  transition: all 0.2s ease;
}

/* Tab functionality styling */
.tab-button {
  position: relative;
  transition: all 0.3s ease;
  overflow: visible;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 42px;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-button.active {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tab-button:before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  width: 0;
  height: 2px;
  transition: width 0.3s ease;
  border-radius: 1px;
}

/* Active tab has blue underline */
.tab-button.active:before {
  width: 80%;
  left: 10%;
  background-color: #fff;
}

/* Inactive tabs have gray underline on hover */
.tab-button:not(.active):before {
  background-color: #6B7280;
}

.tab-button:hover:before {
  width: 80%;
}

.tab-content {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
  opacity: 1;
  transform: translateY(0);
}

/* Add image hover effects */
.service-image {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.service-image:hover {
  transform: scale(1.03);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Stats counter styling */
.counter {
  display: inline-block;
  position: relative;
}

.counter:after {
  content: '+';
  position: absolute;
  font-size: 0.7em;
  top: 0;
  right: -20px;
}

/* Hero image animation */
@keyframes float-image {
  0% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0); }
}

.hero-image {
  animation: float-image 6s ease-in-out infinite;
}

/* Mobile menu button animation */
.menu-button-animation span {
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-button-active span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-button-active span:nth-child(2) {
  opacity: 0;
}

.menu-button-active span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 767px) {
  .mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu-backdrop.opacity-100 {
    opacity: 1;
  }

  #mobileMenu {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 45;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-10px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    top: 100%;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  #mobileMenu.mobile-menu-open {
    transform: translateY(0);
    opacity: 1;
  }

  #mobileMenu a {
    display: block;
    padding: 15px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    position: relative;
    overflow: hidden;
  }

  #mobileMenu a:hover, #mobileMenu a:active {
    background-color: rgba(59, 130, 246, 0.1);
  }

  /* Mobile menu items hover effect */
  #mobileMenu a:before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #60A5FA;
    transition: width 0.3s ease;
  }

  #mobileMenu a:hover:before {
    width: 100%;
  }

  #mobileMenuButton {
    margin-left: auto;
    padding-right: 0;
  }

  /* Ensure the header is properly spaced when showing only the logo */
  header nav {
    padding: 0.25rem 0;
  }
}

/* Sticky header styling */
header.sticky {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Base header styles for all screen sizes */
header {
  width: 100%;
}

header .container {
  width: 100%;
  margin: 0 auto;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Ensure logo is aligned to the left */
header nav > div:first-child {
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
}

/* Mobile-first approach for navigation */
/* Hide desktop nav by default (on mobile) */
header nav > div:nth-child(2) {
  display: none;
}

/* Show it on medium screens and up */
@media (min-width: 768px) {
  header nav > div:nth-child(2) {
    display: flex;
    justify-content: flex-end;
  }

  /* Hide mobile menu and button on desktop */
  #mobileMenu,
  #mobileMenuButton {
    display: none !important;
  }
}

/* Base navigation styles */
header nav ul {
  display: flex;
  align-items: center;
}

header nav ul li a {
  display: block;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Additional mobile adjustments */
@media (max-width: 480px) {
  header nav {
    justify-content: space-between;
    width: 100%;
  }

  header nav ul {
    margin-left: 0;
  }

  header nav ul li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
  }
}

/* Enhance desktop & tablet navigation */
@media (min-width: 768px) {
  header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  header nav a {
    position: relative;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
  }

  header nav a:hover {
    color: #BFDBFE;
    border-bottom-color: #60A5FA;
  }

  header nav a.active {
    color: #BFDBFE;
    border-bottom-color: #60A5FA !important;
  }

  header .container {
    margin: 0 auto;
  }

  /* Make sure desktop nav is visible at correct breakpoints */
  header nav > div:nth-child(2) {
    display: flex !important;
  }
}

#mobileMenuButton {
  position: relative;
  z-index: 20;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.desktop-nav {
  justify-content: flex-end;
}

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

/* Logo styling */
header .logo-container img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 220px;
}

/* Tablet and up base styling */
@media (min-width: 640px) {
  header .logo-container {
    display: flex;
    align-items: center;
  }

  header .logo-container a {
    display: flex;
    align-items: center;
  }
}

/* Logo styling for different screen sizes */
@media (min-width: 640px) and (max-width: 1023px) {
  /* For tablets (sm to lg breakpoint) */
  .company-name {
    font-size: 1.1rem;
  }
}

/* Medium screens and up */
@media (min-width: 768px) {
  header .logo-container {
    max-width: 50%;
  }
}

/* Small mobile only */
@media (max-width: 639px) {
  .company-name {
    display: none;
  }

  header .logo-container img {
    height: 43px;
  }

  header .logo-container {
    display: flex;
    justify-content: flex-start;
  }

  #mobileMenuButton {
    margin-left: auto;
    padding-right: 0;
  }

  /* Ensure proper spacing in header on small screens */
  header nav {
    padding: 0.25rem 0;
    justify-content: space-between;
  }

  header .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 480px) {
  header .logo-container img {
    height: 40px;
  }
}

/* Company name styling */
.company-name {
  display: inline-block;
  font-weight: bold;
  font-size: 1.25rem;
}